summaryrefslogtreecommitdiff
blob: 66139a661206b886a92ed12ade22e1b78dc66165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- gammu/gammu.c.orig	2005-06-30 09:38:18.228171067 +0200
+++ gammu/gammu.c	2005-06-30 09:40:11.892838077 +0200
@@ -436,9 +436,9 @@
 	GSM_Terminate();
 }
 
-GSM_Bitmap		caller[5];
+GSM_Bitmap		caller[6];
 GSM_AllRingtonesInfo 	Info = {0, NULL};
-bool			callerinit[5] = {false, false, false, false, false};
+bool			callerinit[6] = {false, false, false, false, false, false};
 bool			ringinit = false;
 
 static void PrintMemoryEntry(GSM_MemoryEntry *entry)
@@ -498,6 +498,11 @@
 			case PBK_Text_Custom4       : printmsg("Custom text 4   "); break;
 			case PBK_Caller_Group       :
 				unknown = true;
+				if (entry->Entries[i].Number > 5) {
+					printmsg("Caller group     : \"%d\"\n",entry->Entries[i].Number);
+					printmsgerr("Caller group number too high, please increase buffer in sources!\n");
+					break;
+				}
 				if (!callerinit[entry->Entries[i].Number]) {
 					caller[entry->Entries[i].Number].Type	  = GSM_CallerGroupLogo;
 					caller[entry->Entries[i].Number].Location = entry->Entries[i].Number;