h0wl / pdfium

Automatically exported from code.google.com/p/pdfium
1 stars 1 forks source link

Reading uninitialized data in pdfium's fsdk_mgr.h #70

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When I compile pdfium with VC++'s /analyze I hit this warning:

src\third_party\pdfium\fpdfsdk\include\fsdk_mgr.h(96) : warning C6001: Using 
uninitialized memory 'fxtime'

This is because FFI_GetLocalTime does some error checking but in the error case 
just returns the uninitialized data.

The simplest fix is to always initialize fxtime with "FX_SYSTEMTIME fxtime = 
{};"

Feel free to assign this bug to me.

Original issue reported on code.google.com by brucedaw...@chromium.org on 3 Nov 2014 at 11:22

GoogleCodeExporter commented 9 years ago
Bruce, if you put together a patch, I'd be happy to review/land it for you 
[Maybe consider whether the struct should have a constructor to avoid this 
elsewhere]. 

Original comment by tsepez@chromium.org on 5 Nov 2014 at 6:22