diff options
author | Denis Kenzior <denkenz@gmail.com> | 2011-07-25 22:57:08 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-07-25 22:57:08 -0500 |
commit | fe757a5b8348fd13ed96d1f69c846c5c8d9351a1 (patch) | |
tree | 2a0c3c4bcce3a9261ff19d9119ef80ae7e6ebf8f /src/voicecall.c | |
parent | 625045dcb147ad6818209d956e6cb0b65f6ab90e (diff) | |
download | ofono-fe757a5b8348fd13ed96d1f69c846c5c8d9351a1.tar.bz2 |
voicecall: Be more paranoid and null terminate
Diffstat (limited to 'src/voicecall.c')
-rw-r--r-- | src/voicecall.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/voicecall.c b/src/voicecall.c index 7b01c9c9..23976afa 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -2236,10 +2236,13 @@ void ofono_voicecall_notify(struct ofono_voicecall *vc, } if (v->call->clip_validity == CLIP_VALIDITY_NOT_AVAILABLE) { + char *number = v->call->phone_number.number; + v->call->phone_number.type = req->ph.type; - strncpy(v->call->phone_number.number, req->ph.number, + strncpy(number, req->ph.number, OFONO_MAX_PHONE_NUMBER_LENGTH); v->call->clip_validity = CLIP_VALIDITY_VALID; + number[OFONO_MAX_PHONE_NUMBER_LENGTH] = '\0'; } v->message = req->message; |