From b506fa92f8f54f1bb949e558bb554aa9215c8d77 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 16 Oct 2010 10:33:23 +0000 Subject: [PATCH] Fixed an uninitialized variable and crash when sending messages --- src/phone.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/phone.c b/src/phone.c index 04ba0d8..b3e9c04 100644 --- a/src/phone.c +++ b/src/phone.c @@ -2484,6 +2484,7 @@ void phone_write_send(Phone * phone) text = gtk_text_buffer_get_text(tbuf, &start, &end, FALSE); if(number == NULL || number[0] == '\0' || text == NULL) return; + length = strlen(text); if(phone_event(phone, PHONE_EVENT_SMS_SENDING, number, &encoding, &text, &length) != 0) return;