Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Jan 31, 2022
1 parent d58e62e commit 72ffc02
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions libr/meson.build
Expand Up @@ -539,6 +539,7 @@ r_util_files = [
join_paths('include','r_util','r_diff.h'),
join_paths('include','r_util','r_file.h'),
join_paths('include','r_util','r_graph.h'),
join_paths('include','r_util','bplist.h'),
join_paths('include','r_util','r_graph_drawable.h'),
join_paths('include','r_util','r_hex.h'),
join_paths('include','r_util','r_idpool.h'),
Expand Down
3 changes: 2 additions & 1 deletion libr/socket/socket_http_server.c
Expand Up @@ -106,11 +106,12 @@ R_API RSocketHTTPRequest *r_socket_http_accept(RSocket *s, RSocketHTTPOptions *s
}
if (content_length > 0) {
r_socket_read_block (hr->s, (ut8*)buf, 1); // one missing byte wtf
if (ST32_ADD_OVFCHK (content_length, 1)) {
if (content_length >= ST32_MAX) {
r_socket_http_close (hr);
eprintf ("Could not allocate hr data\n");
return NULL;
}
content_length++;
hr->data = malloc (content_length + 1);
if (hr->data) {
hr->data_length = content_length;
Expand Down
2 changes: 1 addition & 1 deletion libr/util/bplist.c
Expand Up @@ -278,7 +278,7 @@ static bool parse_uid_node(RBPlist *bplist, const char **bnode, ut8 size) {
long long intval = UINT_TO_HOST (*bnode, size);
if (intval > UINT32_MAX) {
eprintf ("%s: value %" PRIu64 " too large for UID node (must be <= %u)\n", __func__, (ut64)intval, UINT32_MAX);
return NULL;
return false;
}

(*bnode) += size;
Expand Down

0 comments on commit 72ffc02

Please sign in to comment.