svace TV issue fixed. 30/89330/1 submit/tizen_common/20160923.062909 submit/tizen_mobile/20160923.062859 submit/tizen_tv/20160923.062819
authorLim DoHyung <delight.lim@samsung.com>
Fri, 23 Sep 2016 06:20:16 +0000 (15:20 +0900)
committerLim DoHyung <delight.lim@samsung.com>
Fri, 23 Sep 2016 06:20:16 +0000 (15:20 +0900)
Change-Id: I85c9dccddec7c4ed7047c61a942118b4892baadf
Signed-off-by: Lim DoHyung <delight.lim@samsung.com>
common-adaptor/common-adaptor.c
provider/browser-provider-requests.c

index f2137292988831680d85fc8898256c1e505219cc..f7962e9e1727f99bed9fbc5002a09fe0066dcff1 100755 (executable)
@@ -411,7 +411,7 @@ int bp_common_adaptor_get_blob(const int sock, bp_command_fmt *cmd,
                BP_PRINT_ERROR(cmd->id, *errorcode);
                return -1;
        }
-       if (blob_length < 256 || blob_length > 0) {
+       if (blob_length < 256 && blob_length > 0) {
                blob_data =
                        (unsigned char *)calloc(blob_length, sizeof(unsigned char));
                if (blob_data == NULL) {
@@ -504,7 +504,7 @@ int bp_common_adaptor_get_info_blob(int sock, unsigned char **value,
 {
        int length = 0;
        if ((bp_ipc_read_custom_type(sock, &length,
-                       sizeof(int)) == 0) && (length > 0 || length < 256)) {
+                       sizeof(int)) == 0) && (length > 0 && length < 256)) {
 
                int trans_way = 0; // 0:socket 1:shm
                if (bp_ipc_read_custom_type(sock, &trans_way,
@@ -562,7 +562,7 @@ int bp_common_adaptor_get_blob_shm(const int sock,
                return -1;
        }
 
-       if (blob_length < 256 || blob_length > 0) {
+       if (blob_length < 256 && blob_length > 0) {
 
                // read here what IPC should be used below from provider.
                int trans_way = 0; // 0:socket 1:shm
index 5d448765d7e8e8d10622997708a02d0b77d00d38..a9feb672309519456bade28d0ece456e8c76cb21 100755 (executable)
@@ -584,7 +584,7 @@ bp_error_defs bp_common_set_blob(sqlite3 *handle,
                bp_ipc_send_errorcode(sock, BP_ERROR_IO_ERROR);
                return BP_ERROR_IO_ERROR;
        }
-       if (blob_length < 256 || blob_length > 0) {
+       if (blob_length < 256 && blob_length > 0) {
                blob_data =
                        (unsigned char *)calloc(blob_length, sizeof(unsigned char));
                if (blob_data == NULL) {
@@ -648,7 +648,7 @@ bp_error_defs bp_common_set_blob_with_size(sqlite3 *handle,
                bp_ipc_send_errorcode(sock, BP_ERROR_IO_ERROR);
                return BP_ERROR_IO_ERROR;
        }
-       if (blob_length < 256 || blob_length > 0) {
+       if (blob_length < 256 && blob_length > 0) {
                if (bp_ipc_read_custom_type(sock, &width, sizeof(int)) < 0) {
                        TRACE_ERROR("[ERROR][%d] SET_BLOB [IO_ERROR]", id);
                        bp_ipc_send_errorcode(sock, BP_ERROR_IO_ERROR);
@@ -874,7 +874,7 @@ bp_error_defs bp_common_set_blob_shm(sqlite3 *handle,
                bp_ipc_send_errorcode(sock, BP_ERROR_IO_ERROR);
                return BP_ERROR_IO_ERROR;
        }
-       if (blob_length < 256 || blob_length > 0) {
+       if (blob_length < 256 && blob_length > 0) {
 
                unsigned char *blob_buffer = NULL;
                unsigned char *blob_data = NULL;