Module: sip-router
Branch: 4.0
Commit: c7ef60e6c960c029b49bca01a89498a5dcdeec19
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c7ef60e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Sat Apr 13 11:26:48 2013 +0200
xcap_server: init etag variable for PUT operations
- the function xcaps_get_db_etag() may not found a record to db and will
not initialize it, resulting in bogus value passed to
check_preconditions()
- reported by Juha Heinanen, FS#283
(cherry picked from commit 2d27dd1080cd490e93646b38d3912dcbe3761ca5)
---
modules/xcap_server/xcap_server.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/xcap_server/xcap_server.c b/modules/xcap_server/xcap_server.c
index 24e3269..8bc14eb 100644
--- a/modules/xcap_server/xcap_server.c
+++ b/modules/xcap_server/xcap_server.c
@@ -506,8 +506,8 @@ static int w_xcaps_put(sip_msg_t* msg, char* puri, char* ppath,
str uri;
str path;
str body = {0, 0};
- str etag;
- str etag_hdr;
+ str etag = {0, 0};
+ str etag_hdr = {0, 0};
str tbuf;
str nbuf = {0, 0};
str allow = {0, 0};
@@ -1069,7 +1069,7 @@ static int w_xcaps_get(sip_msg_t* msg, char* puri, char* ppath)
struct sip_uri turi;
str uri;
str path;
- str etag;
+ str etag = {0, 0};
str body;
int ret = 0;
xcap_uri_t xuri;