@github-advanced-security[bot] commented on this pull request.


> @@ -670,18 +683,35 @@
                        retry = 10;
 
                        while ((ret_size < sizeof(struct protocol)) && (retry > 
0)) {
-                               ret_size = recv(pfd, resp + ret_size, 
(sizeof(struct protocol)
-                                                                      - 
ret_size), 0);
+                               ssize_t n = recv(pfd, (char *)resp + ret_size,

## Flawfinder / Function accepts input from outside program (CWE-20).

input/recv:Function accepts input from outside program (CWE-20).

[Show more 
details](https://github.com/openstreetmap/mod_tile/security/code-scanning/3020)

> @@ -74,6 +74,11 @@
        struct meta_layout *m = (struct meta_layout *)malloc(header_len);
        size_t file_offset, tile_size;
 
+       if (m == NULL) {
+               snprintf(log_msg, PATH_MAX - 1, "Failed to allocate memory for 
metatile header\n");

## Flawfinder / If format strings can be influenced by an attacker, they can be 
exploited, and note that sprintf variations do not always \0-terminate 
(CWE-134).

format/snprintf:If format strings can be influenced by an attacker, they can be 
exploited, and note that sprintf variations do not always \0-terminate 
(CWE-134).

[Show more 
details](https://github.com/openstreetmap/mod_tile/security/code-scanning/3018)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/pull/503#pullrequestreview-5481312161
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/mod_tile/pull/503/review/[email protected]>
_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving

Reply via email to