projects
/
platform
/
upstream
/
nnstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82ef329
)
[Api] check null param
author
Jaeyun
<jy1210.jung@samsung.com>
Fri, 2 Aug 2019 07:16:59 +0000
(16:16 +0900)
committer
MyungJoo Ham
<myungjoo.ham@samsung.com>
Mon, 5 Aug 2019 02:16:49 +0000
(11:16 +0900)
In the functions for tensor data, add code to check null param.
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
api/capi/src/nnstreamer-capi-util.c
patch
|
blob
|
history
diff --git
a/api/capi/src/nnstreamer-capi-util.c
b/api/capi/src/nnstreamer-capi-util.c
index
850008c
..
2d86d2c
100644
(file)
--- a/
api/capi/src/nnstreamer-capi-util.c
+++ b/
api/capi/src/nnstreamer-capi-util.c
@@
-548,7
+548,7
@@
ml_tensors_data_get_tensor_data (ml_tensors_data_h data, unsigned int index,
check_feature_state ();
- if (!data)
+ if (!data
|| !raw_data || !data_size
)
return ML_ERROR_INVALID_PARAMETER;
_data = (ml_tensors_data_s *) data;
@@
-573,7
+573,7
@@
ml_tensors_data_set_tensor_data (ml_tensors_data_h data, unsigned int index,
check_feature_state ();
- if (!data)
+ if (!data
|| !raw_data
)
return ML_ERROR_INVALID_PARAMETER;
_data = (ml_tensors_data_s *) data;