summaryrefslogtreecommitdiff
path: root/AGWAPI.c
diff options
context:
space:
mode:
Diffstat (limited to 'AGWAPI.c')
-rw-r--r--AGWAPI.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/AGWAPI.c b/AGWAPI.c
index f40ba4c..5dc2f9c 100644
--- a/AGWAPI.c
+++ b/AGWAPI.c
@@ -1393,7 +1393,13 @@ int ProcessAGWCommand(struct AGWSocketConnectionInfo * sockptr)
if (sockptr->AGWRXHeader.DataKind == 'V') // Unproto with VIA string
{
Digis = sockptr->MsgData[0]; // Number of digis
-
+
+ if (Digis > 7)
+ {
+ AGWDataSocket_Disconnect(sockptr);
+ return 0;
+ }
+
for (j = 1; j<= Digis; j++)
{
ConvToAX25(&sockptr->MsgData[(j - 1) * 10 + 1],&TXMessage[7+(j*7)]); // No "last" bit