Blame SOURCES/cyrus-sasl-2.1.27-coverity.patch

138d55
diff -up cyrus-sasl-2.1.27/include/makemd5.c.coverity cyrus-sasl-2.1.27/include/makemd5.c
138d55
--- cyrus-sasl-2.1.27/include/makemd5.c.coverity	2021-04-12 15:10:25.421431535 +0200
138d55
+++ cyrus-sasl-2.1.27/include/makemd5.c	2021-04-12 15:56:46.752827737 +0200
138d55
@@ -107,7 +107,6 @@ my_strupr(char *s)
138d55
     }	
138d55
 }
138d55
 
138d55
-
138d55
 #define BITSIZE(TYPE)						\
138d55
 {								\
138d55
     int b = 0; TYPE x = 1, zero = 0; char *pre = "U";		\
138d55
@@ -129,6 +128,8 @@ my_strupr(char *s)
138d55
 static void
138d55
 try_signed(FILE *f, int len)
138d55
 {
138d55
+/* Local macros for not-installed program. No coverity/compiler issues! */
138d55
+#pragma GCC diagnostic ignored "-Wformat-overflow"
138d55
 #ifdef HAVE_INT8_T
138d55
     BITSIZE(int8_t);
138d55
 #endif
138d55
@@ -149,6 +150,7 @@ try_signed(FILE *f, int len)
138d55
     BITSIZE(long long);
138d55
 #endif
138d55
     fprintf(f, "/* There is no %d bit type */\n", len);
138d55
+#pragma GCC pop
138d55
 }
138d55
 
138d55
 static void
138d55
diff -up cyrus-sasl-2.1.27/saslauthd/lak.c.coverity cyrus-sasl-2.1.27/saslauthd/lak.c
138d55
--- cyrus-sasl-2.1.27/saslauthd/lak.c.coverity	2018-11-08 18:29:57.000000000 +0100
138d55
+++ cyrus-sasl-2.1.27/saslauthd/lak.c	2021-04-12 15:10:25.433431630 +0200
138d55
@@ -337,9 +337,9 @@ static int lak_config_read(
138d55
          EMPTY(conf->group_search_base) )
138d55
         strlcpy(conf->group_search_base, conf->search_base, LAK_DN_LEN);
138d55
         
138d55
-	fclose(infile);
138d55
+    fclose(infile);
138d55
 
138d55
-	return LAK_OK;
138d55
+    return LAK_OK;
138d55
 }
138d55
 
138d55
 static int lak_config_int(
138d55
diff -up cyrus-sasl-2.1.27/saslauthd/saslauthd-main.c.coverity cyrus-sasl-2.1.27/saslauthd/saslauthd-main.c
138d55
--- cyrus-sasl-2.1.27/saslauthd/saslauthd-main.c.coverity	2018-01-19 15:13:40.000000000 +0100
138d55
+++ cyrus-sasl-2.1.27/saslauthd/saslauthd-main.c	2021-04-12 15:10:25.433431630 +0200
138d55
@@ -833,7 +833,8 @@ void detach_tty() {
138d55
     }
138d55
     
138d55
     logger(L_INFO, L_FUNC, "master pid is: %lu", (unsigned long)master_pid);
138d55
-    
138d55
+    /* null_fd expected to be more than 2, so it is closed after dups, no leaks occur */
138d55
+    /* coverity[leaked_handle : FALSE]*/
138d55
     return;
138d55
 }
138d55