• Sebastian Kemper's avatar
    FS-10939 mod_cdr_mongodb: fix format truncation warnings with gcc 7 · eded5965
    Sebastian Kemper 提交于
    gcc 7 complains about possible format truncation:
    
    mod_cdr_mongodb.c: In function 'my_on_reporting':
    mod_cdr_mongodb.c:242:45: error: '%d' directive output may be truncated writing between 1 and 10 bytes into a region of size 4 [-Werror=format-truncation=]
       snprintf(idx_buffer, sizeof(idx_buffer), "%d", callflow_idx);
    
    The char * idx_buffer has a size of 4 Bytes, and according to gcc's
    calculation it is possible that up to 11 Bytes might be copied into it
    via int bson_idx.
    
    This commit adds an extra 8 Bytes to char * idx_buffer, which silences
    the warnings.
    Signed-off-by: 's avatarSebastian Kemper <sebastian_ml@gmx.net>
    eded5965
名称
最后提交
最后更新
..
applications 正在载入提交数据...
asr_tts 正在载入提交数据...
codecs 正在载入提交数据...
dialplans 正在载入提交数据...
directories/mod_ldap 正在载入提交数据...
endpoints 正在载入提交数据...
event_handlers 正在载入提交数据...
formats 正在载入提交数据...
languages 正在载入提交数据...
loggers 正在载入提交数据...
say 正在载入提交数据...
sdk/autotools 正在载入提交数据...
timers 正在载入提交数据...
xml_int 正在载入提交数据...
.gitignore 正在载入提交数据...
Makefile.am 正在载入提交数据...