check the null prarameters 89/159589/1
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 10 Nov 2017 02:47:53 +0000 (11:47 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 10 Nov 2017 02:48:50 +0000 (11:48 +0900)
check the null parameters at tbm_surface_internal_query_supported_formats

Change-Id: I20e6f3b87d7fcbb37a627f89837f22cbd581d887
Signed-off-by: SooChan Lim <sc1.lim@samsung.com>
src/tbm_surface_internal.c

index cf92797..8c356c1 100644 (file)
@@ -418,6 +418,9 @@ int
 tbm_surface_internal_query_supported_formats(uint32_t **formats,
                uint32_t *num)
 {
+       TBM_RETURN_VAL_IF_FAIL(formats, 0);
+       TBM_RETURN_VAL_IF_FAIL(num, 0);
+
        struct _tbm_bufmgr *mgr;
        int ret = 0;
        bool bufmgr_initialized = false;