Skip to content

Commit

Permalink
proto_hep: fix off by one comparison
Browse files Browse the repository at this point in the history
(cherry picked from commit 4703d29)
  • Loading branch information
razvancrainea committed Jun 10, 2019
1 parent d2f1fd0 commit f1f7d92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/proto_hep/hep.c
Expand Up @@ -1580,7 +1580,7 @@ int add_hep_correlation(trace_message message, str* corr_name, str* corr_value)

_cJSON_AddStrToObject( root, corr_name, corr_value->s, corr_value->len);
} else {
if ( !memcmp( corr_name->s, "sip", sizeof("sip") ) ) {
if ( !memcmp( corr_name->s, "sip", sizeof("sip") - 1 ) ) {
/* we'll save sip correlation id as the actual correlation */
sip_correlation = pkg_malloc( sizeof(str) + corr_value->len );
if ( !sip_correlation ) {
Expand Down

0 comments on commit f1f7d92

Please sign in to comment.