From fd37bd0ac012e15bffad7e83d36b87ee3941d6f5 Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Wed, 26 May 2010 13:28:03 -0400 Subject: Fix off by one error in SmsGenerateClientID when uuid_create is used Fix apparent typo in SmsGenerateClientID which always leaves the first byte of allocated id string uninitialized. If that byte happens to be 0, SmsGenerateClientId appears to return an empty string to the caller, instead of proper GUID in text form. Reviewed-by: James CLoos Signed-off-by: Adam Jackson --- src/sm_genid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sm_genid.c b/src/sm_genid.c index 5ec4547..2cd6d26 100644 --- a/src/sm_genid.c +++ b/src/sm_genid.c @@ -121,7 +121,7 @@ SmsGenerateClientID(SmsConn smsConn) if ((id = malloc (strlen (temp) + 2)) != NULL) { - id[1] = '2'; + id[0] = '2'; strcpy (id+1, temp); } -- cgit v1.2.3