Coverity issue 31/155231/1 accepted/tizen/unified/20171013.193118 submit/tizen/20171013.013536
authorkj7.sung <kj7.sung@samsung.com>
Thu, 12 Oct 2017 10:10:23 +0000 (19:10 +0900)
committerkj7.sung <kj7.sung@samsung.com>
Thu, 12 Oct 2017 10:10:23 +0000 (19:10 +0900)
Change-Id: I9c9ee0e4c8b980ede55eb5c47ba8cccdf2a817f6
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
gps-plugin/src/nmea_parser.c

index 6beafc5..5b042e0 100644 (file)
@@ -3,9 +3,6 @@
  *
  * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Contact: Youngae Kang <youngae.kang@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
- *                     Genie Kim <daejins.kim@samsung.com>
- *
  * 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;