Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(653)

Side by Side Diff: third_party/libxml/src/uri.c

Issue 2010803004: Roll libxml to bdec2183f34b37ee89ae1d330c6ad2bb4d76605f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update README.chromium Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libxml/src/tree.c ('k') | third_party/libxml/src/valid.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * uri.c: set of generic URI related routines 2 * uri.c: set of generic URI related routines
3 * 3 *
4 * Reference: RFCs 3986, 2732 and 2373 4 * Reference: RFCs 3986, 2732 and 2373
5 * 5 *
6 * See Copyright for the status of this software. 6 * See Copyright for the status of this software.
7 * 7 *
8 * daniel@veillard.com 8 * daniel@veillard.com
9 */ 9 */
10 10
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 * of the @uri structure 318 * of the @uri structure
319 * 319 *
320 * port = *DIGIT 320 * port = *DIGIT
321 * 321 *
322 * Returns 0 or the error code 322 * Returns 0 or the error code
323 */ 323 */
324 static int 324 static int
325 xmlParse3986Port(xmlURIPtr uri, const char **str) 325 xmlParse3986Port(xmlURIPtr uri, const char **str)
326 { 326 {
327 const char *cur = *str; 327 const char *cur = *str;
328 unsigned port = 0; /* unsigned for defined overflow behavior */
328 329
329 if (ISA_DIGIT(cur)) { 330 if (ISA_DIGIT(cur)) {
330 unsigned port = 0; /* unsigned for defined overflow behavior */
331 while (ISA_DIGIT(cur)) { 331 while (ISA_DIGIT(cur)) {
332 port = port * 10 + (*cur - '0'); 332 port = port * 10 + (*cur - '0');
333
333 cur++; 334 cur++;
334 } 335 }
335 if (uri != NULL) 336 if (uri != NULL)
336 uri->port = port & INT_MAX; /* port value modulo INT_MAX+1 */ 337 uri->port = port & INT_MAX; /* port value modulo INT_MAX+1 */
337 *str = cur; 338 *str = cur;
338 return(0); 339 return(0);
339 } 340 }
340 return(1); 341 return(1);
341 } 342 }
342 343
(...skipping 2214 matching lines...) Expand 10 before | Expand all | Expand 10 after
2557 } 2558 }
2558 #endif 2559 #endif
2559 memset(&temp, 0, sizeof(temp)); 2560 memset(&temp, 0, sizeof(temp));
2560 temp.path = (char *) cal; 2561 temp.path = (char *) cal;
2561 ret = xmlSaveUri(&temp); 2562 ret = xmlSaveUri(&temp);
2562 xmlFree(cal); 2563 xmlFree(cal);
2563 return(ret); 2564 return(ret);
2564 } 2565 }
2565 #define bottom_uri 2566 #define bottom_uri
2566 #include "elfgcchack.h" 2567 #include "elfgcchack.h"
OLDNEW
« no previous file with comments | « third_party/libxml/src/tree.c ('k') | third_party/libxml/src/valid.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698