ussd.c: Make sure text is memset to zero..
Make the strstr fail fast, make sure the text is null terminated...
diff --git a/openbsc/src/ussd.c b/openbsc/src/ussd.c
index 7f14899..692df5b 100644
--- a/openbsc/src/ussd.c
+++ b/openbsc/src/ussd.c
@@ -44,9 +44,11 @@
/* Entrypoint - handler function common to all mobile-originated USSDs */
int handle_rcv_ussd(struct gsm_subscriber_connection *conn, struct msgb *msg)
{
+ int rc;
struct ussd_request req;
- gsm0480_decode_ussd_request(msg, &req);
+ memset(&req, 0, sizeof(req));
+ rc = gsm0480_decode_ussd_request(msg, &req);
if (req.text[0] == 0xFF) /* Release-Complete */
return 0;