You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2022/06/28 06:48:56 UTC

[GitHub] [mynewt-core] kasjer commented on a diff in pull request #2856: net/ip/native_socks: Fix build on with -Werror=stringop-overflow

kasjer commented on code in PR #2856:
URL: https://github.com/apache/mynewt-core/pull/2856#discussion_r908085008


##########
net/ip/native_sockets/src/native_sock.c:
##########
@@ -196,7 +196,7 @@ native_sock_mn_addr_to_addr(struct mn_sockaddr *ms, struct sockaddr *sa,
         sun->sun_len = sizeof(*sun);
 #endif
         sun->sun_path[0] = '\0';
-        strncat(sun->sun_path, msun->msun_path, sizeof sun->sun_path);
+        strncat(sun->sun_path, msun->msun_path, sizeof (sun->sun_path) - 1);

Review Comment:
   `sizeof(` is predominant (over `sizeof (`)in mynewt including this file 3 lines above sizeof(*sum)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org