From 2daa9afbab2eb7c9d5546ae218545eb68450d0e9 Mon Sep 17 00:00:00 2001 From: "kj7.sung" Date: Thu, 12 Oct 2017 19:10:23 +0900 Subject: [PATCH] Coverity issue Change-Id: I9c9ee0e4c8b980ede55eb5c47ba8cccdf2a817f6 Signed-off-by: kj7.sung --- gps-plugin/src/nmea_parser.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gps-plugin/src/nmea_parser.c b/gps-plugin/src/nmea_parser.c index 6beafc5..5b042e0 100644 --- a/gps-plugin/src/nmea_parser.c +++ b/gps-plugin/src/nmea_parser.c @@ -3,9 +3,6 @@ * * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved. * - * Contact: Youngae Kang , Minjune Kim - * Genie Kim - * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -344,6 +341,8 @@ int nmea_parser_sentence(char *sentence, char *token[], pos_data_t *pos, sv_data int nmea_parser(char *data, pos_data_t *pos, sv_data_t *sv) { + if (!data) return READ_ERROR; + int ret = READ_SUCCESS; read_error_t err; int num_sen = 0; -- 2.7.4