If strbuf_local(buf, len) is called with a buffer whose size can be
deduced at compile time, then this change will check that 'len' does not
exceed that size, causing an assertion failure at run time if it does.
The safety check makes use of the GCC extensions: __builtin_object_size()
and __attribute__((alloc_size(n)). Under non-GCC compilers, the safety
check will not be performed.
Internally the strbuf_local_buf(x) macro uses sizeof(x) to determine
the size of the buffer, but this will give the wrong behaviour if x
is a pointer (char *x), not an array (char x[]). With this change,
invoking it with a pointer will cause a compile error.
The safety check makes use of the GCC extensions: __builtin_object_size()
and __attribute__((alloc_size(n)). Under non-GCC compilers, the safety
check will not be performed.
Need a way for the client to distinguish between authenticated (certain)
and unauthenticated (likely) author SIDs in the context of a bundle list,
since the bundle list does not verify manifest signatures for performance
and battery life reasons.
List all the HTTP status codes in the REST API tech doc.
Only use 403 Forbidden for requests originating from a disallowed
origin (ie, not localhost).
- Return 400 for missing, unknown, duplicate and out-of-order form
parts in POST requests.
- Return 415 Unsupported Media Type for unsupported form part
Content-Disposition and Content-Type (including unsupported
charset).
- Return 414 Request-URI Too Long for any buffer exhaustion while
parsing request.
- Return 419 Authentication Timeout for missing crypto secret.
The ALARM_STRUCT() and DECLARE_TRIGGER() macros included terminating
semicolons, but their invocation should always be followed by a
semicolon, otherwise etags(1) gets confused, so their included semicolon
was redundant.
GCC 4.9 and later warn about unused values produced by the comma
operator. Since the -Wno-unused-value option was removed from the
non-Android Makefile.in, it will not compile the WHY() macro and its
variants, with the -Wall option.
This commit removes the comma operator from the WHY() macro and its
variants, and replaces it with a new inline wrapper function.
This commit also removes the WHYNULL() macro and fixes the three places
it was used.