From 003d4c14152ea50ed4808f1972e5f9e9fd65fe04 Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Mon, 7 Dec 2020 13:04:42 +0000
Subject: [PATCH] (fish.c) fix uninitialized scalar variable
Fix uninitialized scalar variable
found by Coverity
coverity id #32630
coverity id #164548
Signed-off-by: Andreas Mohr <and@gmx.li>
---
src/vfs/fish/fish.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/vfs/fish/fish.c b/src/vfs/fish/fish.c
index 2a97fcb31..33f472f05 100644
a
|
b
|
fish_info (struct vfs_class *me, struct vfs_s_super *super) |
489 | 489 | while (TRUE) |
490 | 490 | { |
491 | 491 | int res; |
492 | | char buffer[BUF_8K]; |
| 492 | char buffer[BUF_8K] = ""; |
493 | 493 | |
494 | 494 | res = vfs_s_get_line_interruptible (me, buffer, sizeof (buffer), fish_super->sockr); |
495 | 495 | if ((res == 0) || (res == EINTR)) |
… |
… |
fish_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, char *remote_path) |
917 | 917 | case 'D': |
918 | 918 | { |
919 | 919 | struct tm tim; |
| 920 | memset(&tim, 0, sizeof(struct tm)); |
920 | 921 | |
921 | 922 | /* cppcheck-suppress invalidscanf */ |
922 | 923 | if (sscanf (buffer + 1, "%d %d %d %d %d %d", &tim.tm_year, &tim.tm_mon, |