strchr is interprets the trailing NUL as part of the string, so is_printable thought NUL was allowed. Just write the code in the obvious way and let the compiler figure it out. (It seems to make a clever bitmask or something.) Update-Note: ASN1_mbstring_ncopy will no longer allow PrintableString for strings containing NUL. Change-Id: I3675191ceb44c06f0ac7b430f88272cabf392d35 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/49065 Reviewed-by: Adam Langley <agl@google.com>grpc-202302
parent
c65543b7a9
commit
96181288c5
2 changed files with 20 additions and 16 deletions
Loading…
Reference in new issue