[yelp] Increase the size of string variables passed to sscanf
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp] Increase the size of string variables passed to sscanf
- Date: Mon, 21 Jan 2019 14:40:17 +0000 (UTC)
commit 6ad30cec3f43ca2a45a7e8079ec30699a73bb6a2
Author: Tomas Popela <tpopela redhat com>
Date: Mon Jul 23 11:43:51 2018 +0200
Increase the size of string variables passed to sscanf
yelp-3.28.1/libyelp/yelp-man-parser.c:549: error[invalidScanfFormatWidth]: Width 10 given in format
string (no. 2) is larger than destination buffer 'name[10]', use %9s to prevent overflowing it.
yelp-3.28.1/libyelp/yelp-man-parser.c:926: error[invalidScanfFormatWidth]: Width 16 given in format
string (no. 1) is larger than destination buffer 'name[16]', use %15s to prevent overflowing it.
libyelp/yelp-man-parser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libyelp/yelp-man-parser.c b/libyelp/yelp-man-parser.c
index 00e66e00..f8eb69f6 100644
--- a/libyelp/yelp-man-parser.c
+++ b/libyelp/yelp-man-parser.c
@@ -545,7 +545,7 @@ parse_prologue_line (YelpManParser *parser, GError **error)
static gboolean
parse_xf (YelpManParser *parser, GError **error)
{
- gchar name[10];
+ gchar name[11];
guint k;
if (SSCANF ("x f%*s %u %10s", 2, &k, name)) {
@@ -920,7 +920,7 @@ append_nbsps (YelpManParser *parser, guint k)
static gboolean
parse_C (YelpManParser *parser, GError **error)
{
- gchar name[16];
+ gchar name[17];
gunichar code = 0;
guint k;
gint len;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]