diff options
author | David Crosby <dave@dafyddcrosby.com> | 2015-07-26 06:12:39 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2015-08-11 12:59:28 +0000 |
commit | 66036b0db62e8b9bdeb575109becc31fa3eff88a (patch) | |
tree | 17ee2ecab281cfb16d0a622d7adf6ae4ce385cfa /buffer.c | |
parent | Adjust UFclose to remove false positive of CWE-481 (diff) | |
download | w3m-66036b0db62e8b9bdeb575109becc31fa3eff88a.tar.gz w3m-66036b0db62e8b9bdeb575109becc31fa3eff88a.zip |
Check for presence of prevl before using
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -761,8 +761,10 @@ readBufferCache(Buffer *buf) } #endif } - buf->lastLine = prevl; - buf->lastLine->next = NULL; + if (prevl) { + buf->lastLine = prevl; + buf->lastLine->next = NULL; + } fclose(cache); unlink(buf->savecache); buf->savecache = NULL; |