diff --git a/basic-cwe-examples/.frama-c/GNUmakefile b/basic-cwe-examples/.frama-c/GNUmakefile index 841b65441e11b0d7f1fe97200ec02a6c65fe41ce..dbfee82626747af69abed8dfeb0012d6e8fcdcac 100644 --- a/basic-cwe-examples/.frama-c/GNUmakefile +++ b/basic-cwe-examples/.frama-c/GNUmakefile @@ -9,7 +9,7 @@ include $(shell $(FRAMAC)-config -print-share-path)/analysis-scripts/prologue.mk # Edit below as needed. MACHDEP is mandatory. Suggested flags are optional. -MACHDEP = x86_32 +MACHDEP = x86_64 ## Preprocessing flags (for -cpp-extra-args) CPPFLAGS += \ diff --git a/basic-cwe-examples/.frama-c/cwe119-precise.parse/framac.ast b/basic-cwe-examples/.frama-c/cwe119-precise.parse/framac.ast index 9df9879f06110f0358b2f8a760a003be5d8659db..610c92b2ce04e2f2248824054003f75f1f645383 100644 --- a/basic-cwe-examples/.frama-c/cwe119-precise.parse/framac.ast +++ b/basic-cwe-examples/.frama-c/cwe119-precise.parse/framac.ast @@ -59,7 +59,7 @@ static int my_strcmp(char const *s1, char const *s2) { int __retres; size_t i; - i = (unsigned int)0; + i = (unsigned long)0; while ((int)*(s1 + i) == (int)*(s2 + i)) { if ((int)*(s1 + i) == 0) { __retres = 0; @@ -107,7 +107,8 @@ void host_lookup(char *user_supplied_addr) char hostname[64]; validate_addr_form(user_supplied_addr); addr = my_inet_addr((char const *)user_supplied_addr); - hp = my_gethostbyaddr((void const *)(& addr),sizeof(struct in_addr),2); + hp = my_gethostbyaddr((void const *)(& addr), + (unsigned int)sizeof(struct in_addr),2); strcpy(hostname,(char const *)hp->h_name); return; } diff --git a/basic-cwe-examples/.frama-c/cwe119.parse/framac.ast b/basic-cwe-examples/.frama-c/cwe119.parse/framac.ast index 9df9879f06110f0358b2f8a760a003be5d8659db..610c92b2ce04e2f2248824054003f75f1f645383 100644 --- a/basic-cwe-examples/.frama-c/cwe119.parse/framac.ast +++ b/basic-cwe-examples/.frama-c/cwe119.parse/framac.ast @@ -59,7 +59,7 @@ static int my_strcmp(char const *s1, char const *s2) { int __retres; size_t i; - i = (unsigned int)0; + i = (unsigned long)0; while ((int)*(s1 + i) == (int)*(s2 + i)) { if ((int)*(s1 + i) == 0) { __retres = 0; @@ -107,7 +107,8 @@ void host_lookup(char *user_supplied_addr) char hostname[64]; validate_addr_form(user_supplied_addr); addr = my_inet_addr((char const *)user_supplied_addr); - hp = my_gethostbyaddr((void const *)(& addr),sizeof(struct in_addr),2); + hp = my_gethostbyaddr((void const *)(& addr), + (unsigned int)sizeof(struct in_addr),2); strcpy(hostname,(char const *)hp->h_name); return; } diff --git a/basic-cwe-examples/.frama-c/cwe190-precise.eva/alarms.csv b/basic-cwe-examples/.frama-c/cwe190-precise.eva/alarms.csv index 7ef8d232e0063d0c495bcc04c52a6c0fdee962fc..13831fb74db4704e99ed6733cb4816605a806b68 100644 --- a/basic-cwe-examples/.frama-c/cwe190-precise.eva/alarms.csv +++ b/basic-cwe-examples/.frama-c/cwe190-precise.eva/alarms.csv @@ -1,2 +1,2 @@ directory file line function property kind status property -. cwe190.c 42 main unsigned_overflow Invalid or unreachable (unsigned int)nresp * sizeof(char *) ≤ 4294967295 +. cwe190.c 43 main unsigned_overflow Invalid or unreachable (unsigned long)nresp * sizeof(char *) ≤ 18446744073709551615 diff --git a/basic-cwe-examples/.frama-c/cwe190-precise.eva/metrics.log b/basic-cwe-examples/.frama-c/cwe190-precise.eva/metrics.log index 4da1ec297fb7c301fdfe3c2e0719cc452cb69f0e..4dbeae98e00eeba36b8e4aa6d861870ce331d5a8 100644 --- a/basic-cwe-examples/.frama-c/cwe190-precise.eva/metrics.log +++ b/basic-cwe-examples/.frama-c/cwe190-precise.eva/metrics.log @@ -5,9 +5,9 @@ Semantically reached functions = 5 Coverage estimation = 100.0% [metrics] Statements analyzed by Eva -------------------------- -41 stmts in analyzed functions, 31 stmts analyzed (75.6%) -packet_get_int_ok: 5 stmts out of 5 (100.0%) -packet_get_int_problem: 5 stmts out of 5 (100.0%) +42 stmts in analyzed functions, 32 stmts analyzed (76.2%) +packet_get_long_ok: 6 stmts out of 6 (100.0%) +packet_get_long_problem: 5 stmts out of 5 (100.0%) packet_get_string: 2 stmts out of 2 (100.0%) -random_int: 1 stmts out of 1 (100.0%) +random_long: 1 stmts out of 1 (100.0%) main: 18 stmts out of 28 (64.3%) diff --git a/basic-cwe-examples/.frama-c/cwe190-precise.eva/nonterm.log b/basic-cwe-examples/.frama-c/cwe190-precise.eva/nonterm.log index e238d5be464fd4bde899ea54a5297ba1e8fec236..1f29297dd34fb75497fa3abdaaf5c6e70d59c6c9 100644 --- a/basic-cwe-examples/.frama-c/cwe190-precise.eva/nonterm.log +++ b/basic-cwe-examples/.frama-c/cwe190-precise.eva/nonterm.log @@ -1,2 +1,2 @@ -cwe190.c:42:[nonterm] warning: non-terminating function call +cwe190.c:43:[nonterm] warning: non-terminating function call stack: main diff --git a/basic-cwe-examples/.frama-c/cwe190-precise.parse/framac.ast b/basic-cwe-examples/.frama-c/cwe190-precise.parse/framac.ast index 9ed5602e800862fd22b0d3ffaef5595cba001491..fb46d8ba7d1b1f33ca8c9919b521c67c115b12ce 100644 --- a/basic-cwe-examples/.frama-c/cwe190-precise.parse/framac.ast +++ b/basic-cwe-examples/.frama-c/cwe190-precise.parse/framac.ast @@ -1,26 +1,28 @@ /* Generated by Frama-C */ #include "stdlib.h" -int volatile _rand; -int random_int(void) +long volatile _rand; +long random_long(void) { return _rand; } -int packet_get_int_ok(void) +long packet_get_long_ok(void) { + long __retres; int tmp_0; - int tmp; - tmp = random_int(); + long tmp; + tmp = random_long(); if (tmp) tmp_0 = 0; else tmp_0 = 123456; - return tmp_0; + __retres = (long)tmp_0; + return __retres; } -int packet_get_int_problem(void) +long packet_get_long_problem(void) { - int tmp_0; - int tmp; - tmp = random_int(); - if (tmp) tmp_0 = 1073741824; else tmp_0 = 0; + long tmp_0; + long tmp; + tmp = random_long(); + if (tmp) tmp_0 = 9223372036854775807L / (long)2; else tmp_0 = (long)0; return tmp_0; } @@ -35,12 +37,12 @@ int main(void) { int __retres; char **response; - int nresp = packet_get_int_ok(); - if (nresp > 0) { - response = (char **)malloc((unsigned int)nresp * sizeof(char *)); + long nresp = packet_get_long_ok(); + if (nresp > (long)0) { + response = (char **)malloc((unsigned long)nresp * sizeof(char *)); if (! response) exit(1); { - int i = 0; + long i = (long)0; while (i < nresp) { *(response + i) = packet_get_string((char const *)0); i ++; @@ -48,12 +50,12 @@ int main(void) } free((void *)response); } - nresp = packet_get_int_problem(); - if (nresp > 0) { - response = (char **)malloc((unsigned int)nresp * sizeof(char *)); + nresp = packet_get_long_problem(); + if (nresp > (long)0) { + response = (char **)malloc((unsigned long)nresp * sizeof(char *)); if (! response) exit(1); { - int i_0 = 0; + long i_0 = (long)0; while (i_0 < nresp) { *(response + i_0) = packet_get_string((char const *)0); i_0 ++; diff --git a/basic-cwe-examples/.frama-c/cwe190-precise.parse/metrics.log b/basic-cwe-examples/.frama-c/cwe190-precise.parse/metrics.log index 94c58dcd1ea028aaca899819eb25a539103ff441..56d34031ea48085c076252ed42d279d4aeb00c56 100644 --- a/basic-cwe-examples/.frama-c/cwe190-precise.parse/metrics.log +++ b/basic-cwe-examples/.frama-c/cwe190-precise.parse/metrics.log @@ -1,7 +1,8 @@ [metrics] Defined functions (5) ===================== - main (0 call); packet_get_int_ok (1 call); packet_get_int_problem (1 call); - packet_get_string (2 calls); random_int (2 calls); + main (0 call); packet_get_long_ok (1 call); + packet_get_long_problem (1 call); packet_get_string (2 calls); + random_long (2 calls); Specified-only functions (0) ============================ @@ -21,13 +22,13 @@ Potential entry points (1) Global metrics ============== -Sloc = 41 +Sloc = 42 Decision point = 8 Global variables = 1 If = 8 Loop = 2 Goto = 0 -Assignment = 18 +Assignment = 19 Exit point = 5 Function = 5 Function call = 12 diff --git a/basic-cwe-examples/.frama-c/cwe190.eva/alarms.csv b/basic-cwe-examples/.frama-c/cwe190.eva/alarms.csv index 95905c5a15f1ba20c0315210847bc0cc3fc17614..cc349dddb8725fa0b0084fe3afa6b57c99287596 100644 --- a/basic-cwe-examples/.frama-c/cwe190.eva/alarms.csv +++ b/basic-cwe-examples/.frama-c/cwe190.eva/alarms.csv @@ -1,2 +1,2 @@ directory file line function property kind status property -. cwe190.c 44 main mem_access Invalid or unreachable \valid(response + i_0) +. cwe190.c 45 main mem_access Unknown \valid(response + i_0) diff --git a/basic-cwe-examples/.frama-c/cwe190.eva/metrics.log b/basic-cwe-examples/.frama-c/cwe190.eva/metrics.log index 1a73b1cf97fce111f9fef712326e73b531dfc7c9..dcda6b9205aded672be457b236d1e2c3bc7ca0a3 100644 --- a/basic-cwe-examples/.frama-c/cwe190.eva/metrics.log +++ b/basic-cwe-examples/.frama-c/cwe190.eva/metrics.log @@ -5,9 +5,9 @@ Semantically reached functions = 5 Coverage estimation = 100.0% [metrics] Statements analyzed by Eva -------------------------- -41 stmts in analyzed functions, 38 stmts analyzed (92.7%) -packet_get_int_ok: 5 stmts out of 5 (100.0%) -packet_get_int_problem: 5 stmts out of 5 (100.0%) +42 stmts in analyzed functions, 42 stmts analyzed (100.0%) +main: 28 stmts out of 28 (100.0%) +packet_get_long_ok: 6 stmts out of 6 (100.0%) +packet_get_long_problem: 5 stmts out of 5 (100.0%) packet_get_string: 2 stmts out of 2 (100.0%) -random_int: 1 stmts out of 1 (100.0%) -main: 25 stmts out of 28 (89.3%) +random_long: 1 stmts out of 1 (100.0%) diff --git a/basic-cwe-examples/.frama-c/cwe190.eva/nonterm.log b/basic-cwe-examples/.frama-c/cwe190.eva/nonterm.log index 02c4a2c51b6640f8a5ba8a0ed1cb4d87136160e6..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/basic-cwe-examples/.frama-c/cwe190.eva/nonterm.log +++ b/basic-cwe-examples/.frama-c/cwe190.eva/nonterm.log @@ -1,2 +0,0 @@ -cwe190.c:44:[nonterm] warning: non-terminating loop -stack: main diff --git a/basic-cwe-examples/.frama-c/cwe190.eva/warnings.log b/basic-cwe-examples/.frama-c/cwe190.eva/warnings.log index 8286bf2bea369092d4f6807e5d241c95d161ea78..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/basic-cwe-examples/.frama-c/cwe190.eva/warnings.log +++ b/basic-cwe-examples/.frama-c/cwe190.eva/warnings.log @@ -1,2 +0,0 @@ -cwe190.c:44:[kernel] warning: all target addresses were invalid. This path is assumed to be dead. -stack: main diff --git a/basic-cwe-examples/.frama-c/cwe190.parse/framac.ast b/basic-cwe-examples/.frama-c/cwe190.parse/framac.ast index 9ed5602e800862fd22b0d3ffaef5595cba001491..fb46d8ba7d1b1f33ca8c9919b521c67c115b12ce 100644 --- a/basic-cwe-examples/.frama-c/cwe190.parse/framac.ast +++ b/basic-cwe-examples/.frama-c/cwe190.parse/framac.ast @@ -1,26 +1,28 @@ /* Generated by Frama-C */ #include "stdlib.h" -int volatile _rand; -int random_int(void) +long volatile _rand; +long random_long(void) { return _rand; } -int packet_get_int_ok(void) +long packet_get_long_ok(void) { + long __retres; int tmp_0; - int tmp; - tmp = random_int(); + long tmp; + tmp = random_long(); if (tmp) tmp_0 = 0; else tmp_0 = 123456; - return tmp_0; + __retres = (long)tmp_0; + return __retres; } -int packet_get_int_problem(void) +long packet_get_long_problem(void) { - int tmp_0; - int tmp; - tmp = random_int(); - if (tmp) tmp_0 = 1073741824; else tmp_0 = 0; + long tmp_0; + long tmp; + tmp = random_long(); + if (tmp) tmp_0 = 9223372036854775807L / (long)2; else tmp_0 = (long)0; return tmp_0; } @@ -35,12 +37,12 @@ int main(void) { int __retres; char **response; - int nresp = packet_get_int_ok(); - if (nresp > 0) { - response = (char **)malloc((unsigned int)nresp * sizeof(char *)); + long nresp = packet_get_long_ok(); + if (nresp > (long)0) { + response = (char **)malloc((unsigned long)nresp * sizeof(char *)); if (! response) exit(1); { - int i = 0; + long i = (long)0; while (i < nresp) { *(response + i) = packet_get_string((char const *)0); i ++; @@ -48,12 +50,12 @@ int main(void) } free((void *)response); } - nresp = packet_get_int_problem(); - if (nresp > 0) { - response = (char **)malloc((unsigned int)nresp * sizeof(char *)); + nresp = packet_get_long_problem(); + if (nresp > (long)0) { + response = (char **)malloc((unsigned long)nresp * sizeof(char *)); if (! response) exit(1); { - int i_0 = 0; + long i_0 = (long)0; while (i_0 < nresp) { *(response + i_0) = packet_get_string((char const *)0); i_0 ++; diff --git a/basic-cwe-examples/.frama-c/cwe190.parse/metrics.log b/basic-cwe-examples/.frama-c/cwe190.parse/metrics.log index 94c58dcd1ea028aaca899819eb25a539103ff441..56d34031ea48085c076252ed42d279d4aeb00c56 100644 --- a/basic-cwe-examples/.frama-c/cwe190.parse/metrics.log +++ b/basic-cwe-examples/.frama-c/cwe190.parse/metrics.log @@ -1,7 +1,8 @@ [metrics] Defined functions (5) ===================== - main (0 call); packet_get_int_ok (1 call); packet_get_int_problem (1 call); - packet_get_string (2 calls); random_int (2 calls); + main (0 call); packet_get_long_ok (1 call); + packet_get_long_problem (1 call); packet_get_string (2 calls); + random_long (2 calls); Specified-only functions (0) ============================ @@ -21,13 +22,13 @@ Potential entry points (1) Global metrics ============== -Sloc = 41 +Sloc = 42 Decision point = 8 Global variables = 1 If = 8 Loop = 2 Goto = 0 -Assignment = 18 +Assignment = 19 Exit point = 5 Function = 5 Function call = 12 diff --git a/basic-cwe-examples/.frama-c/cwe20-precise.parse/framac.ast b/basic-cwe-examples/.frama-c/cwe20-precise.parse/framac.ast index 832c51ac36cde0cfbdb70caf0a5024b6423cded8..33d0f6cda35a344c3d529a84b23f0bceae2772f8 100644 --- a/basic-cwe-examples/.frama-c/cwe20-precise.parse/framac.ast +++ b/basic-cwe-examples/.frama-c/cwe20-precise.parse/framac.ast @@ -130,7 +130,7 @@ int main(void) exit(1); } } - board = (board_square_t *)malloc((unsigned int)(m * n) * sizeof(board_square_t)); + board = (board_square_t *)malloc((unsigned long)(m * n) * sizeof(board_square_t)); free((void *)board); __retres = 0; return __retres; diff --git a/basic-cwe-examples/.frama-c/cwe20.parse/framac.ast b/basic-cwe-examples/.frama-c/cwe20.parse/framac.ast index 832c51ac36cde0cfbdb70caf0a5024b6423cded8..33d0f6cda35a344c3d529a84b23f0bceae2772f8 100644 --- a/basic-cwe-examples/.frama-c/cwe20.parse/framac.ast +++ b/basic-cwe-examples/.frama-c/cwe20.parse/framac.ast @@ -130,7 +130,7 @@ int main(void) exit(1); } } - board = (board_square_t *)malloc((unsigned int)(m * n) * sizeof(board_square_t)); + board = (board_square_t *)malloc((unsigned long)(m * n) * sizeof(board_square_t)); free((void *)board); __retres = 0; return __retres; diff --git a/basic-cwe-examples/.frama-c/cwe416-precise.parse/framac.ast b/basic-cwe-examples/.frama-c/cwe416-precise.parse/framac.ast index f036f7c092d9d724f1d8b42fc7e6ad565974775a..e06272b0204b351242768194d838b2625b299d77 100644 --- a/basic-cwe-examples/.frama-c/cwe416-precise.parse/framac.ast +++ b/basic-cwe-examples/.frama-c/cwe416-precise.parse/framac.ast @@ -14,16 +14,16 @@ int main(int argc, char **argv) char *buf2R1; char *buf2R2; char *buf3R2; - buf1R1 = (char *)malloc((unsigned int)512); + buf1R1 = (char *)malloc((unsigned long)512); if (! buf1R1) exit(1); - buf2R1 = (char *)malloc((unsigned int)512); + buf2R1 = (char *)malloc((unsigned long)512); if (! buf2R1) exit(1); free((void *)buf2R1); - buf2R2 = (char *)malloc((unsigned int)(512 / 2 - 8)); + buf2R2 = (char *)malloc((unsigned long)(512 / 2 - 8)); if (! buf2R2) exit(1); - buf3R2 = (char *)malloc((unsigned int)(512 / 2 - 8)); + buf3R2 = (char *)malloc((unsigned long)(512 / 2 - 8)); if (! buf3R2) exit(1); - strncpy(buf2R1,(char const *)*(argv + 1),(unsigned int)(512 - 1)); + strncpy(buf2R1,(char const *)*(argv + 1),(unsigned long)(512 - 1)); free((void *)buf1R1); free((void *)buf2R2); free((void *)buf3R2); diff --git a/basic-cwe-examples/.frama-c/cwe416.parse/framac.ast b/basic-cwe-examples/.frama-c/cwe416.parse/framac.ast index f036f7c092d9d724f1d8b42fc7e6ad565974775a..e06272b0204b351242768194d838b2625b299d77 100644 --- a/basic-cwe-examples/.frama-c/cwe416.parse/framac.ast +++ b/basic-cwe-examples/.frama-c/cwe416.parse/framac.ast @@ -14,16 +14,16 @@ int main(int argc, char **argv) char *buf2R1; char *buf2R2; char *buf3R2; - buf1R1 = (char *)malloc((unsigned int)512); + buf1R1 = (char *)malloc((unsigned long)512); if (! buf1R1) exit(1); - buf2R1 = (char *)malloc((unsigned int)512); + buf2R1 = (char *)malloc((unsigned long)512); if (! buf2R1) exit(1); free((void *)buf2R1); - buf2R2 = (char *)malloc((unsigned int)(512 / 2 - 8)); + buf2R2 = (char *)malloc((unsigned long)(512 / 2 - 8)); if (! buf2R2) exit(1); - buf3R2 = (char *)malloc((unsigned int)(512 / 2 - 8)); + buf3R2 = (char *)malloc((unsigned long)(512 / 2 - 8)); if (! buf3R2) exit(1); - strncpy(buf2R1,(char const *)*(argv + 1),(unsigned int)(512 - 1)); + strncpy(buf2R1,(char const *)*(argv + 1),(unsigned long)(512 - 1)); free((void *)buf1R1); free((void *)buf2R2); free((void *)buf3R2); diff --git a/basic-cwe-examples/.frama-c/cwe787-precise.parse/framac.ast b/basic-cwe-examples/.frama-c/cwe787-precise.parse/framac.ast index 3a9b0588f6a40b7758645979b0215c7922323d23..c0895f3d9ac201d235e61b50299dd366ece38202 100644 --- a/basic-cwe-examples/.frama-c/cwe787-precise.parse/framac.ast +++ b/basic-cwe-examples/.frama-c/cwe787-precise.parse/framac.ast @@ -8,7 +8,7 @@ char *copy_input(char *user_supplied_string) int dst_index; size_t tmp_0; char *dst_buf = - malloc(((unsigned int)4 * sizeof(char)) * (unsigned int)16); + malloc(((unsigned long)4 * sizeof(char)) * (unsigned long)16); if (! dst_buf) exit(1); tmp_0 = strlen((char const *)user_supplied_string); if ((size_t)16 <= tmp_0) exit(1); diff --git a/basic-cwe-examples/.frama-c/cwe787.parse/framac.ast b/basic-cwe-examples/.frama-c/cwe787.parse/framac.ast index 3a9b0588f6a40b7758645979b0215c7922323d23..c0895f3d9ac201d235e61b50299dd366ece38202 100644 --- a/basic-cwe-examples/.frama-c/cwe787.parse/framac.ast +++ b/basic-cwe-examples/.frama-c/cwe787.parse/framac.ast @@ -8,7 +8,7 @@ char *copy_input(char *user_supplied_string) int dst_index; size_t tmp_0; char *dst_buf = - malloc(((unsigned int)4 * sizeof(char)) * (unsigned int)16); + malloc(((unsigned long)4 * sizeof(char)) * (unsigned long)16); if (! dst_buf) exit(1); tmp_0 = strlen((char const *)user_supplied_string); if ((size_t)16 <= tmp_0) exit(1); diff --git a/basic-cwe-examples/cwe190.c b/basic-cwe-examples/cwe190.c index e303db70153ac167c0dede63a448d5130f3de56c..e0507cf1fd79b780dea070a8d597f5e106b49a27 100644 --- a/basic-cwe-examples/cwe190.c +++ b/basic-cwe-examples/cwe190.c @@ -7,20 +7,21 @@ // Adding option "-warn-unsigned-overflow" ensures Eva reports the // overflow as soon as it happens. +#include <limits.h> #include <stdlib.h> -volatile int _rand; -// returns a random int -int random_int(void) { +volatile long _rand; +// returns a random long +long random_long(void) { return _rand; } -int packet_get_int_ok() { - return random_int() ? 0 : 123456; // ok size +long packet_get_long_ok() { + return random_long() ? 0 : 123456; // ok size } -int packet_get_int_problem() { - return random_int() ? 1073741824 : 0; // too large (>= INT_MAX/4) +long packet_get_long_problem() { + return random_long() ? LONG_MAX/2 : 0; // too large } char *packet_get_string(const char *s) { @@ -29,19 +30,19 @@ char *packet_get_string(const char *s) { int main() { char **response; - int nresp = packet_get_int_ok(); + long nresp = packet_get_long_ok(); if (nresp > 0) { response = malloc(nresp*sizeof(char*)); if (!response) exit(1); - for (int i = 0; i < nresp; i++) response[i] = packet_get_string(NULL); + for (long i = 0; i < nresp; i++) response[i] = packet_get_string(NULL); free(response); } - nresp = packet_get_int_problem(); + nresp = packet_get_long_problem(); if (nresp > 0) { response = malloc(nresp*sizeof(char*)); if (!response) exit(1); - for (int i = 0; i < nresp; i++) response[i] = packet_get_string(NULL); + for (long i = 0; i < nresp; i++) response[i] = packet_get_string(NULL); free(response); } return 0;