blob: a07847a32143ab27cf55c5b37c6099f14065a623 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--- modules/yahoo2/libyahoo2/yahoo_httplib.c.orig Fri Jan 16 14:39:20 2004
+++ modules/yahoo2/libyahoo2/yahoo_httplib.c Sun Feb 8 00:33:04 2004
@@ -200,12 +200,16 @@
str[bpos++] = instr[ipos++];
if(!instr[ipos])
break;
- ipos++;
- entity[0]=instr[ipos++];
- entity[1]=instr[ipos++];
- sscanf(entity, "%2x", &dec);
- str[bpos++] = (char)dec;
+ if(instr[ipos+1] && instr[ipos+2]) {
+ ipos++;
+ entity[0]=instr[ipos++];
+ entity[1]=instr[ipos++];
+ sscanf(entity, "%2x", &dec);
+ str[bpos++] = (char)dec;
+ } else {
+ str[bpos++] = instr[ipos++];
+ }
}
str[bpos]='\0';
|