]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add get image with null terminator
authorBastian Dehn <hhaalo@arcor.de>
Fri, 17 Oct 2025 18:10:05 +0000 (20:10 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 17 Oct 2025 18:10:05 +0000 (20:10 +0200)
src/kds_s2000w_client.c

index 323fee52f0a06756d352dd87defa03369faac059..a6dd2bc0cff27afac52d0cedfad1ee3e6cc1641b 100644 (file)
@@ -469,6 +469,7 @@ uint8_t kds_s2000w_client_get_image(int64_t sessionid, uint8_t img_number, respo
        curl_easy_setopt(param->curl, CURLOPT_HTTPGET, 1L);
        curl_easy_setopt(param->curl, CURLOPT_WRITEDATA, resp);
        CURLcode result = curl_easy_perform(param->curl);
+       _kds_s2000w_client_add_null_terminate_to_response(resp);
        curl_easy_getinfo(param->curl, CURLINFO_RESPONSE_CODE, &resp->code);
 
        _kds_s2000w_client_print_error_status(param->curl);