Increase max header length to 4096 bytes 70/272970/1 accepted/tizen/6.5/unified/20220329.134637 submit/tizen_6.5/20220329.025606
authorSeonah Moon <seonah1.moon@samsung.com>
Tue, 29 Mar 2022 01:58:16 +0000 (10:58 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Tue, 29 Mar 2022 01:58:16 +0000 (10:58 +0900)
Change-Id: I8107e41c559d96dada2b56c16472d172222984ea

packaging/download-provider.spec
provider-interface/download-provider-interface.c
provider/include/download-provider.h

index 1c4fa7a9831ba51a63393ec48ddc952a51c9fadd..a94d99043012e24717f3eab251a00627c0d9b036 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       download-provider
 Summary:    Download the contents in background
-Version:    2.2.9
+Version:    2.2.10
 Release:    0
 Group:      Development/Libraries
 License:    Apache-2.0
index 5844c32b73df4cb23ea0c00e76cc64411a183ba1..dfb15e8e9b73ed95903b62356b625c8dd7a183c4 100755 (executable)
@@ -1502,7 +1502,7 @@ int dp_interface_add_http_header_field(const int id, const char *field,
                return DOWNLOAD_ADAPTOR_ERROR_INVALID_PARAMETER;
        }
        if (value == NULL || (value_length = strlen(value)) <= 0 ||
-                       value_length > DP_MAX_STR_LEN) {
+                       value_length > DP_MAX_HEADER_LEN) {
                TRACE_ERROR("check value (%zd:%s)", value_length, value);
                return DOWNLOAD_ADAPTOR_ERROR_INVALID_PARAMETER;
        }
index 41c12ead576d8e31a97ffc9e87116cc068d89d5c..879c80c8b49fdd47e1dbba7fe3e8fd247b656ed7 100755 (executable)
@@ -94,6 +94,7 @@ typedef enum {
 
 #define MAX_DOWNLOAD_HANDLE 32
 #define DP_MAX_STR_LEN 2048
+#define DP_MAX_HEADER_LEN 4096
 #define DP_DEFAULT_BUFFER_SIZE 1024
 
 // string to check invalid characters in path before using open() and fopen() API's