mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 334295 status is used uninitialized in DocumentViewerImpl::DumpContentToPPM if fopen fails
r=roc sr=roc
This commit is contained in:
parent
e0725bc241
commit
5aa27b6361
@ -960,7 +960,9 @@ DocumentViewerImpl::DumpContentToPPM(const char* aFileName)
|
||||
PRUint8* buf = new PRUint8[3*width];
|
||||
if (buf) {
|
||||
FILE* f = fopen(aFileName, "wb");
|
||||
if (f) {
|
||||
if (!f) {
|
||||
status = "FOPENFAILED";
|
||||
} else {
|
||||
fprintf(f, "P6\n%d\n%d\n255\n", width, height);
|
||||
for (PRUint32 i = 0; i < height; ++i) {
|
||||
PRUint8* src = data + i*rowSpan;
|
||||
|
Loading…
Reference in New Issue
Block a user