gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Limit phonebook to 1000 entries (as on 6131)


From: Keith Packard
Subject: [PATCH] Limit phonebook to 1000 entries (as on 6131)
Date: Sun, 8 Jul 2007 21:32:56 -0700

---
 common/phones/nk6510.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index 58135f4..e519f8a 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -2138,6 +2138,9 @@ static gn_error NK6510_ReadPhonebookLocation(gn_data 
*data, struct gn_statemachi
 
        dprintf("Reading phonebook location (%d)\n", location);
 
+       if (location > 1000)
+               return GN_ERR_INVALIDLOCATION;
+
        req[9] = memtype;
        req[14] = location >> 8;
        req[15] = location & 0xff;
-- 
1.5.2.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]