Skip to content

Commit

Permalink
fix reading of uninitialized memory for sta file
Browse files Browse the repository at this point in the history
  • Loading branch information
FhGSpCo committed Apr 14, 2023
1 parent e2a74c7 commit 184383a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/eid/gen-patt.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,9 @@ int main (int argc, char *argv[]) {
}
}

/* initialize state_file with 0, to make sure the string is terminated with \0, which FIND_PAR_S () doesn't add */
memset(state_file, 0, sizeof(state_file));

/* Get command line parameters */
GET_PAR_S (1, "_Output bit stream file ...........................: ", data_file_name);
FIND_PAR_C (2, "_Processing mode (Random,Frame,Burst) [RFB] .......: ", mode, mode);
Expand Down

0 comments on commit 184383a

Please sign in to comment.