summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2021-11-28 10:42:03 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2021-11-30 17:52:59 +0000
commit6a902614350d46b759fc09a88daf9aff11f79ee8 (patch)
tree928f2b6de200071b10fd1981aeaec0714a643041
parent4bf092e35a92b4fb613f4fee01d5ab26a612ddb6 (diff)
Increase size of number buffer to fit all possible values
Clears gcc warning of: info.c: In function ‘DisplayProps’: info.c:214:44: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] snprintf (number, sizeof(number), "%d", propnum); ^ info.c:214:7: note: ‘snprintf’ output between 2 and 11 bytes into a destination of size 10 snprintf (number, sizeof(number), "%d", propnum); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/info.c b/info.c
index 56f830e..44abe93 100644
--- a/info.c
+++ b/info.c
@@ -150,7 +150,7 @@ DisplayProps(ClientRec *client)
if (ListCount (client->props) > 0)
{
- char number[10];
+ char number[16];
char *ptr;
AppendStr (&buffer, "*** ID = ");