Created
July 27, 2017 13:02
-
-
Save ShikherVerma/a40e172e7ff3cdc3d430a0d4f427be33 to your computer and use it in GitHub Desktop.
Example C program. gcc test.c; ./a.out; This verifies that strlen on unsigned char array gives the length of content and not the length of array.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
static unsigned char push_cert_sha1[20]; | |
int main() { | |
printf("Length = %d", strlen(push_cert_sha1)); | |
sprintf(push_cert_sha1, "Hello"); | |
printf("Length = %d", strlen(push_cert_sha1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment