-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ThingName to a maximum of 128 characters (#468)
* Update max ThingName size to 128 The AWS IoT Core quota says that thingnames can be up to 128 characters long. This did not match out existing implementation which limited the ThingName to 64 characters. The ThingName may be truncated when added to the ClientToken. --------- Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
- Loading branch information
1 parent
45342aa
commit e43672a
Showing
9 changed files
with
178 additions
and
48 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
/** | ||
* FUNCTION: strnlen | ||
* | ||
* This function stubs the standard implementation of the strnlen function | ||
* from string.h. It returns the size of the c-string *s up to a maximum of | ||
* length maxlen. The length excludes the null-byte. | ||
*/ | ||
|
||
|
||
#include <stdlib.h> | ||
|
||
/** | ||
* Stub strnlen used by CBMC. | ||
*/ | ||
size_t strnlen( const char * s, | ||
size_t maxlen ) | ||
{ | ||
#ifdef __CPROVER_STRING_ABSTRACTION | ||
__CPROVER_precondition( __CPROVER_is_zero_string( s ), "strnlen zero-termination" ); | ||
return __CPROVER_zero_string_length( s ); | ||
#else | ||
size_t len = 0; | ||
|
||
while( s[ len ] != 0 && len < maxlen ) | ||
{ | ||
len++; | ||
} | ||
return len; | ||
#endif | ||
} | ||
|
||
size_t __builtin___strnlen_chk( const char * s, | ||
size_t maxlen ) | ||
{ | ||
return strnlen( s, maxlen ); | ||
} |
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
Oops, something went wrong.