Skip to content

Commit

Permalink
Merge pull request #1038 from jsberg-bnl/211103-buf-overflow
Browse files Browse the repository at this point in the history
Fixed buffer overflow issues.
  • Loading branch information
madcern committed Nov 4, 2021
2 parents 4cca2aa + fc5ec69 commit 477a951
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mad_macro.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ make_macro(char* statement)
struct macro* m;
char** toks = tmp_l_array->p;
int i, n, rs, re, start_2;
int len = strlen(statement);
int len = strlen(statement)+1;
while(len >= aux_buff->max) grow_char_array(aux_buff);
strcpy(aux_buff->c, statement);
get_bracket_range(aux_buff->c, '{', '}', &rs, &re);
Expand Down
2 changes: 1 addition & 1 deletion src/twiss.f90
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ SUBROUTINE twiss(rt,disp0,tab_name,sector_tab_name)
dtbyds = get_value('probe ','dtbyds ')
charge = get_value('probe ','charge ')
npart = get_value('probe ','npart ')
eig_tol = get_value('twiss ','clorb_tol' )
eig_tol = get_value('twiss ','clorb_tol ' )


!---- Set fast_error_func flag to use faster error function
Expand Down

0 comments on commit 477a951

Please sign in to comment.