/[packages]/updates/5/curl/current/SOURCES/CVE-2016-8617.patch
ViewVC logotype

Contents of /updates/5/curl/current/SOURCES/CVE-2016-8617.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1064880 - (show annotations) (download)
Thu Nov 3 11:30:14 2016 UTC (7 years, 5 months ago) by shlomif
File size: 1234 byte(s)
Apply modified patches for latest CVEs (MGA#19700).

- Does not build locally on mgav6 - let's see if it builds on mgav5 in the BS.

1 --- curl-7.40.0/lib/base64.c.0023 2016-11-03 12:50:20.579714622 +0200
2 +++ curl-7.40.0/lib/base64.c 2016-11-03 12:51:49.739059261 +0200
3 @@ -176,40 +176,45 @@
4 const char *inputbuff, size_t insize,
5 char **outptr, size_t *outlen)
6 {
7 CURLcode error;
8 unsigned char ibuf[3];
9 unsigned char obuf[4];
10 int i;
11 int inputparts;
12 char *output;
13 char *base64data;
14 char *convbuf = NULL;
15
16 const char *indata = inputbuff;
17
18 *outptr = NULL;
19 *outlen = 0;
20
21 if(0 == insize)
22 insize = strlen(indata);
23
24 +#if SIZEOF_SIZE_T == 4
25 + if(insize > UINT_MAX/4)
26 + return CURLE_OUT_OF_MEMORY;
27 +#endif
28 +
29 base64data = output = malloc(insize*4/3+4);
30 if(NULL == output)
31 return CURLE_OUT_OF_MEMORY;
32
33 /*
34 * The base64 data needs to be created using the network encoding
35 * not the host encoding. And we can't change the actual input
36 * so we copy it to a buffer, translate it, and use that instead.
37 */
38 error = Curl_convert_clone(data, indata, insize, &convbuf);
39 if(error) {
40 free(output);
41 return error;
42 }
43
44 if(convbuf)
45 indata = (char *)convbuf;
46
47 while(insize > 0) {
48 for(i = inputparts = 0; i < 3; i++) {

Properties

Name Value
svn:eol-style native

  ViewVC Help
Powered by ViewVC 1.1.30