Fix a potential buffer overflow
When compiling with -Wformat-overflow=2 GCC reports: note: 'sprintf' output between 16 and 35 bytes into a destination of size 32
This commit is contained in:
4
buffer.c
4
buffer.c
@@ -239,7 +239,7 @@ writeBufferName(Buffer *buf, int n)
|
||||
void
|
||||
gotoLine(Buffer *buf, int n)
|
||||
{
|
||||
char msg[32];
|
||||
char msg[36];
|
||||
Line *l = buf->firstLine;
|
||||
|
||||
if (l == NULL)
|
||||
@@ -284,7 +284,7 @@ gotoLine(Buffer *buf, int n)
|
||||
void
|
||||
gotoRealLine(Buffer *buf, int n)
|
||||
{
|
||||
char msg[32];
|
||||
char msg[36];
|
||||
Line *l = buf->firstLine;
|
||||
|
||||
if (l == NULL)
|
||||
|
Reference in New Issue
Block a user