Bug 17720 - [support/minizip/unzip.c:733]: (error) Uninitialized variable: file_info_internal
Summary: [support/minizip/unzip.c:733]: (error) Uninitialized variable: file_info_inte...
Status: RESOLVED INVALID
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: 3.2.x
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-02-12 04:03 UTC by etienne.champetier
Modified: 2014-02-13 10:09 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description etienne.champetier 2014-02-12 04:03:47 UTC
Hi,

[support/minizip/unzip.c:733]: (error) Uninitialized variable: file_info_internal

I don't know how to fix it
Comment 1 Rodrigo Kumpera 2014-02-12 19:18:41 UTC
This is a false positive from your static analyser.

Following the code:

unzlocal_getLong does assign either zero or the decoded value to the supplied pointer.

unzlocal_GetCurrentFileInfoInternal pass &file_info_internal.offset_curfile to unzlocal_getLong.


file_info_internal is of type unz_file_info_internal, which is just a single long, so the store in unzlocal_getLong will fully initialize the struct.
Comment 2 etienne.champetier 2014-02-13 03:23:26 UTC
Hi,

sorry i missed this line while rereading

cppcheck give a lot of false positive :(
Comment 3 Rodrigo Kumpera 2014-02-13 09:41:33 UTC
It found a real bug in marshal.c and that's what count. :)

Thanks for going through all those reports.
Comment 4 etienne.champetier 2014-02-13 10:09:51 UTC
Haven't read all, but i've corrected some bug myself
see (and merge) https://github.com/mono/mono/pull/897