]> git.pld-linux.org Git - packages/texinfo.git/blob - texinfo-segv.patch
- use snprintf
[packages/texinfo.git] / texinfo-segv.patch
1 --- texinfo-4.13/makeinfo/sectioning.c.org      2008-11-03 23:01:26.957799459 +0100
2 +++ texinfo-4.13/makeinfo/sectioning.c  2008-11-03 23:02:10.180927044 +0100
3 @@ -256,14 +256,14 @@
4      return xstrdup ("");
5    else if (enum_marker == APPENDIX_MAGIC)
6      {
7 -      char s[1];
8 +      char s[2];
9 -      sprintf (s, "%c", numbers[0] + 64);
10 +      snprintf (s, sizeof(s), "%c", numbers[0] + 64);
11        return xstrdup (s);
12      }
13    else
14      {
15        char s[5];
16 -      sprintf (s, "%d", numbers[0]);
17 +      snprintf (s, sizeof(s), "%d", numbers[0]);
18        return xstrdup (s);
19      }
20  }
This page took 0.027601 seconds and 3 git commands to generate.