summaryrefslogtreecommitdiffstats
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 87a41920b9..0b0bc8fc2b 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1627,7 +1627,9 @@ static int ata_smart_attr_to_string(
if (len >= name_sz) len = name_sz-1;
slen += len;
}
- snprintf(str+slen, size-slen, "%s", buf);
+
+ if (!memccpy (str+slen, buf, '\0', size-slen))
+ (str+slen)[size-slen - 1] = '\0';
}
return 1; /* ok */