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
|
void
|
||||||
gotoLine(Buffer *buf, int n)
|
gotoLine(Buffer *buf, int n)
|
||||||
{
|
{
|
||||||
char msg[32];
|
char msg[36];
|
||||||
Line *l = buf->firstLine;
|
Line *l = buf->firstLine;
|
||||||
|
|
||||||
if (l == NULL)
|
if (l == NULL)
|
||||||
@@ -284,7 +284,7 @@ gotoLine(Buffer *buf, int n)
|
|||||||
void
|
void
|
||||||
gotoRealLine(Buffer *buf, int n)
|
gotoRealLine(Buffer *buf, int n)
|
||||||
{
|
{
|
||||||
char msg[32];
|
char msg[36];
|
||||||
Line *l = buf->firstLine;
|
Line *l = buf->firstLine;
|
||||||
|
|
||||||
if (l == NULL)
|
if (l == NULL)
|
||||||
|
Reference in New Issue
Block a user