Skip to content

Commit

Permalink
bson: make bson_init_static() take a size_t.
Browse files Browse the repository at this point in the history
This breaks ABI, so need to bump ABI version.
  • Loading branch information
Christian Hergert committed Dec 13, 2013
1 parent 2685b1a commit 2fba96d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bson/bson.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,15 +1273,15 @@ bson_reinit (bson_t *bson)
bson_bool_t
bson_init_static (bson_t *bson,
const bson_uint8_t *data,
bson_uint32_t length)
size_t length)
{
bson_impl_alloc_t *impl = (bson_impl_alloc_t *)bson;
bson_uint32_t len_le;

bson_return_val_if_fail (bson, FALSE);
bson_return_val_if_fail (data, FALSE);

if (length < 5) {
if ((length < 5) || (length > INT_MAX)) {
return FALSE;
}

Expand Down
2 changes: 1 addition & 1 deletion bson/bson.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ bson_new (void);
bson_bool_t
bson_init_static (bson_t *b,
const bson_uint8_t *data,
bson_uint32_t length);
size_t length);


/**
Expand Down

0 comments on commit 2fba96d

Please sign in to comment.