mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 513832: Initialize 'state' before passing it to ParseFTPList(),
and pass the same 'state' to subsequent ParseFTPList() calls. sr=bzbarsky.
This commit is contained in:
parent
969ed37003
commit
dbf75d51ad
@ -283,6 +283,9 @@ nsFTPDirListingConv::DigestBufferLines(char *aBuffer, nsCString &aString) {
|
||||
char *eol;
|
||||
PRBool cr = PR_FALSE;
|
||||
|
||||
list_state state;
|
||||
state.magic = 0;
|
||||
|
||||
// while we have new lines, parse 'em into application/http-index-format.
|
||||
while ( line && (eol = PL_strchr(line, nsCRT::LF)) ) {
|
||||
// yank any carriage returns too.
|
||||
@ -295,7 +298,6 @@ nsFTPDirListingConv::DigestBufferLines(char *aBuffer, nsCString &aString) {
|
||||
cr = PR_FALSE;
|
||||
}
|
||||
|
||||
list_state state;
|
||||
list_result result;
|
||||
|
||||
int type = ParseFTPList(line, &state, &result );
|
||||
|
Loading…
Reference in New Issue
Block a user