We now support MIME strings of maximal length B_MIME_TYPE_LENGTH including the null only. Adjusted the tests accordingly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1132 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2746,7 +2746,13 @@ static
|
|||||||
void
|
void
|
||||||
init_long_types(char *notTooLongType, char *tooLongType)
|
init_long_types(char *notTooLongType, char *tooLongType)
|
||||||
{
|
{
|
||||||
|
// R5: Allows buffer sizes up to `B_MIME_TYPE_LENGTH + 1'
|
||||||
|
// OBOS: We stay consistent: `*_LENGTH' defines the buffer size.
|
||||||
|
#ifdef TEST_R5
|
||||||
const int notTooLongLength = B_MIME_TYPE_LENGTH;
|
const int notTooLongLength = B_MIME_TYPE_LENGTH;
|
||||||
|
#else
|
||||||
|
const int notTooLongLength = B_MIME_TYPE_LENGTH - 1;
|
||||||
|
#endif
|
||||||
const int tooLongLength = notTooLongLength + 1;
|
const int tooLongLength = notTooLongLength + 1;
|
||||||
strcpy(notTooLongType, "image/");
|
strcpy(notTooLongType, "image/");
|
||||||
memset(notTooLongType + strlen(notTooLongType), 'a',
|
memset(notTooLongType + strlen(notTooLongType), 'a',
|
||||||
|
|||||||
Reference in New Issue
Block a user