Your message dated Sun, 09 Oct 2011 10:47:11 +0000
with message-id <[email protected]>
and subject line Bug#628593: fixed in cppcheck 1.51-1
has caused the Debian Bug report #628593,
regarding cppcheck: false-negative for realloc with non-initialized pointer in 
loop
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
628593: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628593
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cppcheck
Version: 1.48-1
Severity: wishlist
Tags: upstream

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

I noticed that cppcheck does not complain about realloc being passed an 
uninitialized
pointer (at least not if it is in a loop).  I have included a small test case
demonstrating this.

~Niels

- -- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.38-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cppcheck depends on:
ii  libc6                         2.13-4     Embedded GNU C Library: Shared lib
ii  libgcc1                       1:4.6.0-2  GCC support library
ii  libpcre3                      8.12-3     Perl 5 Compatible Regular Expressi
ii  libstdc++6                    4.6.0-2    The GNU Standard C++ Library v3
ii  libtinyxml2.5.3               2.5.3-3    C++ XML parsing library

cppcheck recommends no packages.

cppcheck suggests no packages.

- -- no debconf information

*** test.c
#include <stdlib.h>
#include <stdio.h>

char * f(FILE *fp){
  char *p;
  int len = 100;
  do {
    char *tmp = realloc(p, len + 1);
    if (!tmp){
      free(p);
      return NULL;
    }
    p = tmp;
  } while(condition());
  return p;
}

int condition() { return 1; }

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJN46fMAAoJEAVLu599gGRCmIcP/1uAhvLu97guQ3uiZe9j4GaI
WuAsropHXXMnHFO9FqQFSm8aXd6CPLAcZrMKwuYLKgKfnVIkT03gxAl1be7tqLk5
Lxzcw+Cxqf+1LWvQRQyZJI950bqcasoFaqdAfwJ+JNXgz++X/vT3tvcUl3WhL8jU
fKkzMbKCihTjLCwfgE0uVcN3MvgeR5YBY4IVw6Lec5vQCdRwApPB1PVb/HmVe/6O
RpZyZ9ckcO/u8/7BXyeI71723cw+cHJ8bhvIp3Da176DsMp/7RChWRc7nKk7plEu
PCjWBXf3dIeWSEvRlkO8gzkfVfNG2+COd7U1l0TqDkLbnPMd5FsjgvX13mFfwNfG
pT1z4JB3JWDsG+1bc8SHMFleUALNRYReOQN6Sm0TkAgW8XjZs+dyoxy72O/1tK5j
IYzM3AVk3ZLWWALNgXX2xmTZAxvxKxQfgxXBSLdK5Tr6PtHnRFAFD7CbJ3kY0DMR
I59vCX6fljIVMJB8LrlJLAn7tEZLJEEScSTVW3xQF745j7mKgjtvKbu6ESLftzSx
Ig2V/YJWmb5PHU3k9hTFafW5aktJptc94s7XwiGX9eVj29xvY+7I5gMC2yt5EbQS
Iaa2eb/ijJiT+mA4MIYys+rAtYUJLE43kPmf5b6AQXeuCPaes4erkvSROfL0sRWd
3/8vCTzGzc4jr8ENY9RT
=6luE
-----END PGP SIGNATURE-----



--- End Message ---
--- Begin Message ---
Source: cppcheck
Source-Version: 1.51-1

We believe that the bug you reported is fixed in the latest version of
cppcheck, which is due to be installed in the Debian FTP archive:

cppcheck_1.51-1.debian.tar.gz
  to main/c/cppcheck/cppcheck_1.51-1.debian.tar.gz
cppcheck_1.51-1.dsc
  to main/c/cppcheck/cppcheck_1.51-1.dsc
cppcheck_1.51-1_amd64.deb
  to main/c/cppcheck/cppcheck_1.51-1_amd64.deb
cppcheck_1.51.orig.tar.gz
  to main/c/cppcheck/cppcheck_1.51.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Reijo Tomperi <[email protected]> (supplier of updated cppcheck 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 08 Oct 2011 21:55:53 +0300
Source: cppcheck
Binary: cppcheck
Architecture: source amd64
Version: 1.51-1
Distribution: unstable
Urgency: low
Maintainer: Reijo Tomperi <[email protected]>
Changed-By: Reijo Tomperi <[email protected]>
Description: 
 cppcheck   - tool for static C/C++ code analysis
Closes: 628593
Changes: 
 cppcheck (1.51-1) unstable; urgency=low
 .
   * New upstream release
   * Fix false-negative for realloc. Closes: #628593
Checksums-Sha1: 
 a980e1bc10fbb6db9604f8013286aeacce52e85e 1185 cppcheck_1.51-1.dsc
 31dd48daeb9bebb1ec4b2c4ab95f545404d1e05a 1190131 cppcheck_1.51.orig.tar.gz
 02c753970d5c94dc74ab8f6640e6fbac9639f3d6 5510 cppcheck_1.51-1.debian.tar.gz
 e04c79c3699055f6cfb778dc6b7c4d4187aa30b8 777376 cppcheck_1.51-1_amd64.deb
Checksums-Sha256: 
 aa66e719026193e93832cf10e7568c2891161e0f786ab3b024ebfd3122565a0c 1185 
cppcheck_1.51-1.dsc
 9d417ee31b6d4db199834d6ffb6fbd27c5675e42f1a159e853818cc819f0ff55 1190131 
cppcheck_1.51.orig.tar.gz
 d134b9f54ad16e1a07cbffa12e18898bfee93c26b71cce9bd2ff41abe0b6e15f 5510 
cppcheck_1.51-1.debian.tar.gz
 c2ebdfd60a95eb22907cb5cd465e814dfa530a76be56005679c6a07c4af5e4bd 777376 
cppcheck_1.51-1_amd64.deb
Files: 
 3456ad0c70cc2e93e273da1c0c86efa8 1185 devel optional cppcheck_1.51-1.dsc
 672f655cfb51815a3e8af38e55651b5e 1190131 devel optional 
cppcheck_1.51.orig.tar.gz
 19bb43a3aec78203fb5e0667c9835c14 5510 devel optional 
cppcheck_1.51-1.debian.tar.gz
 ec68a8100a7dc9e96ce707c9d1b6b11c 777376 devel optional 
cppcheck_1.51-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk6RduYACgkQt2NXKBU/+UDl5ACdFpQKYj9mHaPU3EM4qcmKQXG2
rS0AniF5vY9atgfHPnVBU8CIcCcmdf3F
=nABM
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to