diff options
author | Tomas Popela <tpopela@redhat.com> | 2018-07-23 11:43:51 +0200 |
---|---|---|
committer | David King <amigadave@amigadave.com> | 2019-01-21 14:38:59 +0000 |
commit | 6ad30cec3f43ca2a45a7e8079ec30699a73bb6a2 (patch) | |
tree | 290956a0b7d389b9cd6606790d1341a5936c33cf | |
parent | 8b2fab2978b90757d927010dd1faa2840a4e7f07 (diff) | |
download | yelp-6ad30cec3f43ca2a45a7e8079ec30699a73bb6a2.tar.gz |
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.
-rw-r--r-- | libyelp/yelp-man-parser.c | 4 |
1 files 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; |