ObjFW  Diff

Differences From Artifact [213596bf3e]:

To Artifact [d2aca0a264]:


588
589
590
591
592
593
594
595

596
597
598
599
600
601
602

	@try {
		void *pool = objc_autoreleasePoolPush();
		const char *UTF8String = string.UTF8String;
		size_t length = string.UTF8StringLength;
		const char *colon;

		if ((colon = strchr(UTF8String, ':')) == NULL)

			@throw [OFInvalidFormatException exception];

		_percentEncodedScheme = [[[OFString
		    stringWithUTF8String: UTF8String
				  length: colon - UTF8String] lowercaseString]
		    copy];








|
>







588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603

	@try {
		void *pool = objc_autoreleasePoolPush();
		const char *UTF8String = string.UTF8String;
		size_t length = string.UTF8StringLength;
		const char *colon;

		if ((colon = strchr(UTF8String, ':')) == NULL ||
		    colon - UTF8String < 1 || !OFASCIIIsAlpha(UTF8String[0]))
			@throw [OFInvalidFormatException exception];

		_percentEncodedScheme = [[[OFString
		    stringWithUTF8String: UTF8String
				  length: colon - UTF8String] lowercaseString]
		    copy];