recipes: Preserve warnings flags appending the C flags in some (specific) recipes
[dragora.git] / patches / giflib / fix-get-args-segment-violation.patch
blob15954505a0b737ffee0044e0b4ae3ade1430a741
1 Description: Fix segmentation faults due to non correct checking for args
2 Author: David Suárez <david.sephirot@gmail.com>
3 Origin: vendor
4 Bug: https://sourceforge.net/p/giflib/bugs/153/
5 Bug-Debian: https://bugs.debian.org/715963
6 Bug-Debian: https://bugs.debian.org/715964
7 Bug-Debian: https://bugs.debian.org/715967
8 Last-Update: 2020-12-20
10 --- a/getarg.c
11 +++ b/getarg.c
12 @@ -305,6 +305,12 @@
13 int i = 0, ScanRes;
15 while (!(ISSPACE(CtrlStrCopy[i]))) {
17 + if ((*argv) == argv_end) {
18 + GAErrorToken = Option;
19 + return CMD_ERR_NumRead;
20 + }
22 switch (CtrlStrCopy[i + 1]) {
23 case 'd': /* Get signed integers. */
24 ScanRes = sscanf(*((*argv)++), "%d",