isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 532d964aea327c4ff77fac5c3979c7d302f97d76
parent 09db83809a60a3999b733129061b69882ec86f59
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Sat, 12 Apr 2014 18:59:45 +0200

error-check renaming of uid mapping database

for pedantry.

found by coverity.

Diffstat:
Msrc/compat/convert.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/compat/convert.c b/src/compat/convert.c @@ -240,7 +240,10 @@ convert( config_t *box ) goto err4; } db->close( db, 0 ); - rename( iumname, diumname ); + if (rename( iumname, diumname )) { + sys_error( "Cannot rename %s to %s", iumname, diumname ); + goto err4; + } } else { if (!(fp = fopen( uvname, "w" ))) { sys_error( "Cannot create %s", uvname );