From cabd52f1f0682bac467126e45b56680936c77e0b Mon Sep 17 00:00:00 2001 From: erin_yueh Date: Fri, 15 Feb 2008 07:23:19 +0000 Subject: gsmd: bug fixed for atcmd buffer lengh (Erin Yueh) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4066 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/gsmd/atcmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c index 51c1722..cee16f9 100644 --- a/src/gsmd/atcmd.c +++ b/src/gsmd/atcmd.c @@ -619,8 +619,7 @@ struct gsmd_atcmd *atcmd_fill(const char *cmd, int rlen, atcmd->cb = cb; atcmd->resp = NULL; atcmd->timeout = NULL; - strlcpy(atcmd->buf, cmd, buflen); - + strncpy(atcmd->buf, cmd, buflen-1); if (!ct) atcmd->create_timer_func = discard_timer; else -- cgit v1.2.3