Various bson_append calls throughout the driver specify -1 as the key length, which directs libbson to call strlen() on the function argument. For situations where we know the string length (e.g. string literal), we should explicitly specify the string length.
The BSON_APPEND macros discussed in the libbson documentation might also be reasonable if we can rely on the compiler to optimize strlen() calls for string literals.