On Fri, Apr 28, 2017 at 09:43:23PM +0200, Moritz Barsnick wrote:
> Hi,
> I just checked my build of pgp.c:
> 
> gcc -std=gnu99  -Wall -pedantic -Wno-long-long -g -O2   -o pgpring 
> pgppubring.o pgplib.o lib.o extlib.o sha1.o md5.o pgppacket.o ascii.o
> pgp.c: In function ‘pgp_decrypt_mime’:
> pgp.c:1010: warning: ‘saved_length’ may be used uninitialized in this function
> pgp.c:1009: warning: ‘saved_offset’ may be used uninitialized in this function
> pgp.c:1008: warning: ‘saved_type’ may be used uninitialized in this function
> 
> I think gcc (4.3.2) may actually be right.

Thank you for the report.

In this case, the values are safe.  They are initialized if need_decode
is set, and are subsequently read only under the same condition
(need_decode being set).

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to