From b2350437f4a3a94f0ffb9562857c2b4b8cf3fea0 Mon Sep 17 00:00:00 2001 From: Rangaiah Date: Mon, 25 Nov 2024 11:47:36 +0530 Subject: [PATCH] Increased webConfigURL array size --- src/webcfg.h | 1 + src/webcfg_multipart.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/webcfg.h b/src/webcfg.h index 44b3fe48..33b02b32 100644 --- a/src/webcfg.h +++ b/src/webcfg.h @@ -25,6 +25,7 @@ /* Macros */ /*----------------------------------------------------------------------------*/ #define MAX_BUF_SIZE 256 +#define MAX_URL_LENGTH 768 #define MAX_PARAMETERNAME_LENGTH 512 #ifdef BUILD_YOCTO diff --git a/src/webcfg_multipart.c b/src/webcfg_multipart.c index e5a4af69..abe249aa 100644 --- a/src/webcfg_multipart.c +++ b/src/webcfg_multipart.c @@ -216,7 +216,7 @@ WEBCFG_STATUS webcfg_http_request(char **configData, int r_count, int status, lo struct token_data data; data.size = 0; void * dataVal = NULL; - char syncURL[256]={'\0'}; + char syncURL[MAX_URL_LENGTH]={'\0'}; char docname_upper[64]={'\0'}; curl = curl_easy_init(); @@ -321,7 +321,7 @@ WEBCFG_STATUS webcfg_http_request(char **configData, int r_count, int status, lo if(strlen(docList) > 0) { WebcfgDebug("docList is %s\n", docList); - snprintf(syncURL, MAX_BUF_SIZE, "%s?group_id=%s", webConfigURL, docList); + snprintf(syncURL, MAX_URL_LENGTH, "%s?group_id=%s", webConfigURL, docList); WEBCFG_FREE(webConfigURL); WebcfgDebug("syncURL is %s\n", syncURL); webConfigURL =strdup( syncURL);