From db317f0fcff836bf3f4bb542eec8e6b59b5e216a Mon Sep 17 00:00:00 2001 From: "Martin Ewing, AA6E" Date: Thu, 15 Nov 2007 04:10:31 +0000 Subject: [PATCH] Fix bug that seg faulted when get_info returned null. (No reward points!) git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2246 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- tentec/orion.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tentec/orion.c b/tentec/orion.c index 8d0503745..62cb2dca0 100644 --- a/tentec/orion.c +++ b/tentec/orion.c @@ -2,7 +2,7 @@ * Hamlib TenTenc backend - TT-565 description * Copyright (c) 2004-2007 by Stephane Fillod & Martin Ewing * - * $Id: orion.c,v 1.21 2007-11-09 03:16:32 aa6e Exp $ + * $Id: orion.c,v 1.22 2007-11-15 04:10:31 aa6e Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -839,7 +839,8 @@ const char *tt565_get_info(RIG *rig) if (retval != RIG_OK || firmware_len < 8) { rig_debug(RIG_DEBUG_ERR,"%s: ack NG, len=%d\n", __FUNCTION__, firmware_len); - return NULL; + buf[0] = '\0'; + return buf; } buf[firmware_len] = '\0';