From patchwork Fri May 23 06:54:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Freyther X-Patchwork-Id: 351746 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [IPv6:2001:780:45:1d:225:90ff:fe52:c662]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9AE23140086 for ; Fri, 23 May 2014 16:57:20 +1000 (EST) Received: from localhost ([127.0.0.1] helo=ganesha.gnumonks.org) by ganesha.gnumonks.org with esmtp (Exim 4.72) (envelope-from ) id 1WnjPg-0005tN-Nw; Fri, 23 May 2014 08:57:09 +0200 Received: from mail.sysmocom.de ([144.76.43.93]) by ganesha.gnumonks.org with esmtp (Exim 4.72) (envelope-from ) id 1WnjNy-0005qh-AH for openbsc@lists.osmocom.org; Fri, 23 May 2014 08:55:26 +0200 Received: from sangmingze-mail.local (24-134-58-61-dynip.superkabel.de [24.134.58.61]) by mail.sysmocom.de (Postfix) with ESMTPSA id 3152B5ADE8; Fri, 23 May 2014 06:55:22 +0000 (UTC) Received: from localhost.home ([127.0.0.1] helo=xiaoyu.home) by sangmingze-mail.local with esmtp (Exim 4.82) (envelope-from ) id 1WnjO1-0006Gw-IN; Fri, 23 May 2014 08:55:25 +0200 From: Holger Hans Peter Freyther To: openbsc@lists.osmocom.org Subject: [PATCH 2/2] gsm0411_smr: Fix the size of the array Date: Fri, 23 May 2014 08:54:58 +0200 Message-Id: <1400828098-24079-2-git-send-email-holger@freyther.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1400828098-24079-1-git-send-email-holger@freyther.de> References: <1400828098-24079-1-git-send-email-holger@freyther.de> X-Spam-Score: 0.0 (/) Cc: andreas@eversberg.eu X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openbsc-bounces@lists.osmocom.org Errors-To: openbsc-bounces@lists.osmocom.org From: Holger Hans Peter Freyther The code is lacking a "," at the end of a string and we ended up doing string concatination instead of having an invalid state. Fixes Coverity CID 1206564 --- src/gsm/gsm0411_smr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gsm/gsm0411_smr.c b/src/gsm/gsm0411_smr.c index a7e9d24..eb1f036 100644 --- a/src/gsm/gsm0411_smr.c +++ b/src/gsm/gsm0411_smr.c @@ -97,7 +97,7 @@ void gsm411_smr_clear(struct gsm411_smr_inst *inst) static const char *smr_state_names[] = { "IDLE", "WAIT_FOR_RP_ACK", - "illegal state 2" + "illegal state 2", "WAIT_TO_TX_RP_ACK", "WAIT_FOR_RETRANS_T", };