1 // http://www.securityfocus.com/archive/1/312869 --- originally by Richard Kettlewell 2 #include <stdlib.h> 3 #include <zlib.h> 4 #include <errno.h> 5 #include <stdio.h> 6 main(void)7int main(void) { 8 gzFile f; 9 int ret; 10 11 if(!(f = gzopen("/dev/null", "w"))) { 12 perror("/dev/null"); 13 exit(1); 14 } 15 16 ret = gzprintf(f, "%10240s", ""); 17 printf("gzprintf -> %d\n", ret); 18 ret = gzclose(f); 19 printf("gzclose -> %d [%d]\n", ret, errno); 20 21 exit(0); 22 } 23