diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-01-16 11:18:04 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-01-16 11:18:04 +0200 |
commit | 6a071bd0026898a3f43074280b1004e8f0aea2e4 (patch) | |
tree | b73009aa27f9ed924feee890dc20a4c12cd42e44 /src | |
parent | d9b5a3fcb122277222b80ff40ac786d2c5ad4ab8 (diff) |
Bail out from extract_des if sdp_uuid_extract fails
Diffstat (limited to 'src')
-rw-r--r-- | src/sdpd-request.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sdpd-request.c b/src/sdpd-request.c index 15cba2b2..acfacaf4 100644 --- a/src/sdpd-request.c +++ b/src/sdpd-request.c @@ -176,11 +176,11 @@ static int extract_des(uint8_t *buf, int len, sdp_list_t **svcReqSeq, uint8_t *p case SDP_UUID128: pElem = malloc(sizeof(uuid_t)); status = sdp_uuid_extract(p, bufsize, (uuid_t *) pElem, &localSeqLength); - if (status == 0) { - seqlen += localSeqLength; - p += localSeqLength; - bufsize -= localSeqLength; - } + if (status < 0) + return -1; + seqlen += localSeqLength; + p += localSeqLength; + bufsize -= localSeqLength; break; default: return -1; |