Skip to content

Commit

Permalink
carrierroute: avoid truncating value returned by fgetc
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudiu Boriga committed Aug 1, 2017
1 parent 3a9365f commit dbafb5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/carrierroute/cr_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ static int init_prefix_opts(){

static int backup_config(void) {
FILE * from, * to;
char * backup_file, ch;
char * backup_file;
int ch;
LM_INFO("start configuration backup\n");
if((backup_file = pkg_malloc(strlen(config_file) + strlen (".bak") + 1)) == NULL){
PKG_MEM_ERROR;
Expand Down

0 comments on commit dbafb5a

Please sign in to comment.