commit aff0c88a38ddeba1926b9512f1cfeceff46387d4
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Sun Nov 24 10:54:52 2019 +0100

    fix printf length arguments on lp64
    
    found by coverity.

 src/compat/config.c | 2 +-
 src/compat/main.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compat/config.c b/src/compat/config.c
index 2377961..08d2017 100644
--- a/src/compat/config.c
+++ b/src/compat/config.c
@@ -259,7 +259,7 @@ write_imap_server( FILE *fp, config_t *cfg )
                        if (!p)
                                hl = nfsnprintf( buf, sizeof(buf), "%s", 
cfg->host );
                        else {
-                               hl = nfsnprintf( buf, sizeof(buf), "%.*s", p - 
cfg->host, cfg->host );
+                               hl = nfsnprintf( buf, sizeof(buf), "%.*s", 
(int)(p - cfg->host), cfg->host );
                                p2 = strrchr( buf, '.' );
                                if (p2)
                                        hl = sprintf( buf, "%s", p2 + 1 );
diff --git a/src/compat/main.c b/src/compat/main.c
index 17b4037..f83ed74 100644
--- a/src/compat/main.c
+++ b/src/compat/main.c
@@ -376,7 +376,7 @@ main( int argc, char **argv )
                        if (!p)
                                nfsnprintf( path2, sizeof(path2), "%s.mbsync", 
config );
                        else
-                               nfsnprintf( path2, sizeof(path2), "%.*smb%s", p 
- config, config, p + 1 );
+                               nfsnprintf( path2, sizeof(path2), "%.*smb%s", 
(int)(p - config), config, p + 1 );
                        outconfig = path2;
                }
                if ((fd = creat( outconfig, 0666 )) < 0) {


_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to