mirror of
https://github.com/coturn/coturn.git
synced 2025-11-01 07:21:04 +01:00
Fix off-by-one when terminating gcm_nonce (#1039)
The `gcm_nonce` character array is `12 + 1` chars long. Writing to `gcm_nonce[12 + 1]` overflows the array by one char.
This commit is contained in:
parent
6f14716149
commit
f488aa6921
@ -337,7 +337,7 @@ int main(int argc, char **argv)
|
||||
nonce_size=OAUTH_GCM_NONCE_SIZE;
|
||||
}
|
||||
strncpy(gcm_nonce,nonce_val,nonce_size);
|
||||
gcm_nonce[ nonce_size + 1 ]='\0';
|
||||
gcm_nonce[ nonce_size ]='\0';
|
||||
break;
|
||||
case 'p':
|
||||
//token-mac-key
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user