aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_modem_bestdata.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2001-10-18 16:47:57 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2001-10-18 16:47:57 +0000
commit3b0ed1ec21c33db5533265e3f0339074324e2817 (patch)
treee6f64a0d6ef32dc8598367c752db154a16cf3a4b /channels/chan_modem_bestdata.c
parent45ac69512b3210e5e4bd6e0b5c66d615f7b47c4e (diff)
Version 0.1.10 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@376 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_modem_bestdata.c')
-rwxr-xr-xchannels/chan_modem_bestdata.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_modem_bestdata.c b/channels/chan_modem_bestdata.c
index 59fbca11c..a360e32fd 100755
--- a/channels/chan_modem_bestdata.c
+++ b/channels/chan_modem_bestdata.c
@@ -189,7 +189,7 @@ static struct ast_frame *bestdata_handle_escape(struct ast_modem_pvt *p, char es
char res[1000];
if (ast_modem_read_response(p, 5)) break;
- strncpy(res, p->response, sizeof(res));
+ strncpy(res, p->response, sizeof(res)-1);
ast_modem_trim(res);
if (!strncmp(res,"\020.",2)) break;
if (!strncmp(res,"NAME",4)) strcpy(name,res + 7);
@@ -419,17 +419,17 @@ static char *bestdata_identify(struct ast_modem_pvt *p)
char rev[80];
ast_modem_send(p, "AT+FMM", 0);
ast_modem_read_response(p, 5);
- strncpy(mdl, p->response, sizeof(mdl));
+ strncpy(mdl, p->response, sizeof(mdl)-1);
ast_modem_trim(mdl);
ast_modem_expect(p, "OK", 5);
ast_modem_send(p, "AT+FMI", 0);
ast_modem_read_response(p, 5);
- strncpy(mfr, p->response, sizeof(mfr));
+ strncpy(mfr, p->response, sizeof(mfr)-1);
ast_modem_trim(mfr);
ast_modem_expect(p, "OK", 5);
ast_modem_send(p, "AT+FMR", 0);
ast_modem_read_response(p, 5);
- strncpy(rev, p->response, sizeof(rev));
+ strncpy(rev, p->response, sizeof(rev)-1);
ast_modem_trim(rev);
ast_modem_expect(p, "OK", 5);
snprintf(identity, sizeof(identity), "%s Model %s Revision %s", mfr, mdl, rev);