Skip to content

Commit

Permalink
samples: net: rpl_border_router: Fix out-of-bounds write
Browse files Browse the repository at this point in the history
While printing debugging information, an out of bounds write could
happen while trying to write out the NUL byte in the url array.

Coverity-ID: 178790
Signed-off-by: Leandro Pereira <[email protected]>
  • Loading branch information
lpereira authored and MaureenHelm committed Jun 8, 2018
1 parent e7a3d01 commit b7ad50b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/net/rpl_border_router/src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,7 @@ static void http_connected(struct http_ctx *ctx,
void *user_data)
{
char url[32];
int len = min(sizeof(url), ctx->http.url_len);
size_t len = min(sizeof(url) - 1, ctx->http.url_len);

NET_DBG("");

Expand Down

0 comments on commit b7ad50b

Please sign in to comment.