SF Bug Tracker id 3497159 - Bug fix in Parser_readFileOrBuffer
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 14:20:58 PST fileSize = ftell( xmlFilePtr ); can return a negative value, in this case the function should exit (at the moment, the function exits only if ftell returns 0). (cherry picked from commit a8bcbe94911d13718d07f5dd6f5fdb1f76c58ded)
This commit is contained in:
parent
75fdad1108
commit
908391ddf0
10
ChangeLog
10
ChangeLog
@ -359,6 +359,16 @@ Version 1.6.16
|
||||
The problem was observed on WIN32.
|
||||
|
||||
|
||||
2012-03-05 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||
|
||||
SF Bug Tracker id 3497159 - Bug fix in Parser_readFileOrBuffer
|
||||
|
||||
Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 14:20:58 PST
|
||||
|
||||
fileSize = ftell( xmlFilePtr ); can return a negative value, in this
|
||||
case the function should exit (at the moment, the function exits only
|
||||
if ftell returns 0).
|
||||
|
||||
2012-03-05 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||
|
||||
SF Bug Tracker id 3497140 - Bug fix in http_get_code_text
|
||||
|
@ -2,6 +2,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2003 Intel Corporation
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@ -2535,7 +2536,7 @@ static int Parser_readFileOrBuffer(
|
||||
} else {
|
||||
fseek( xmlFilePtr, 0, SEEK_END );
|
||||
fileSize = ftell( xmlFilePtr );
|
||||
if( fileSize == 0 ) {
|
||||
if( fileSize <= 0 ) {
|
||||
fclose( xmlFilePtr );
|
||||
return IXML_SYNTAX_ERR;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user