Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/analyzer/zlib-4.c @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
#include <stdlib.h> #include <string.h> typedef unsigned char Byte; typedef unsigned int uInt; typedef unsigned long uLong; #define Z_NULL 0 void test () { uLong comprLen = 10000*sizeof(int); uLong uncomprLen = comprLen; Byte *compr = (Byte*)calloc((uInt)comprLen, 1); Byte *uncompr = (Byte*)calloc((uInt)uncomprLen, 1); if (compr == Z_NULL || uncompr == Z_NULL) exit (1); strcpy((char*)uncompr, "garbage"); exit (0); }