29 lines
729 B
Diff
29 lines
729 B
Diff
From df3b9600a16061a7661a58ba2750228b07825486 Mon Sep 17 00:00:00 2001
|
|
From: "bas@zoetekouw.net" <bas@zoetekouw.net>
|
|
Date: Wed, 9 Aug 2017 12:22:24 +0200
|
|
Subject: [PATCH] Fix possible out-of-buffer write
|
|
|
|
---
|
|
src/manual.c | 5 ++---
|
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/manual.c b/src/manual.c
|
|
index 09b77f7..431dd66 100644
|
|
--- a/src/manual.c
|
|
+++ b/src/manual.c
|
|
@@ -211,9 +211,8 @@ construct_manualname(char *buf, int which)
|
|
ptr++;
|
|
strcpy(buf, ptr);
|
|
tmppos = strlen(buf);
|
|
- /* TODO: check the following statement */
|
|
- if (tmppos > 1);
|
|
- buf[tmppos - 2] = 0;
|
|
+ if (tmppos > 1)
|
|
+ buf[tmppos - 2] = 0;
|
|
strcat(buf, manuallinks[which].name);
|
|
xfree(base);
|
|
}
|
|
--
|
|
2.33.0
|
|
|