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:
Rene Kita
2021-08-30 20:09:11 +02:00
parent cf7058b56c
commit c5c63a1a3d

View File

@@ -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)