diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2021-11-28 10:42:03 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2021-11-30 17:52:59 +0000 |
commit | 6a902614350d46b759fc09a88daf9aff11f79ee8 (patch) | |
tree | 928f2b6de200071b10fd1981aeaec0714a643041 | |
parent | 4bf092e35a92b4fb613f4fee01d5ab26a612ddb6 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -150,7 +150,7 @@ DisplayProps(ClientRec *client) if (ListCount (client->props) > 0) { - char number[10]; + char number[16]; char *ptr; AppendStr (&buffer, "*** ID = "); |