Ticket #4103: mc-4103-cid-find.c-fix-uninitialized-scalar-variable.patch

File mc-4103-cid-find.c-fix-uninitialized-scalar-variable.patch, 875 bytes (added by and, 20 months ago)
  • src/filemanager/find.c

    From 8192140090c24fc6776979b622b086699fe19c61 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Mon, 7 Dec 2020 13:10:30 +0000
    Subject: [PATCH] (find.c) fix uninitialized scalar variable
    
    Fix uninitialized scalar variable
    
    found by Coverity
    coverity id #32628
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/filemanager/find.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/filemanager/find.c b/src/filemanager/find.c
    index c54256303..0faf0adfd 100644
    a b static gboolean 
    985985search_content (WDialog * h, const char *directory, const char *filename) 
    986986{ 
    987987    struct stat s; 
    988     char buffer[BUF_4K];        /* raw input buffer */ 
     988    char buffer[BUF_4K] = "";        /* raw input buffer */ 
    989989    int file_fd; 
    990990    gboolean ret_val = FALSE; 
    991991    vfs_path_t *vpath;