ObjFW  Check-in [328252420b]

Overview
Comment:OFDNSResolver: Fix wrong shifts
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 328252420b2d9dd47f42340d8e68fbd66ffe480bd0171a42eef8a1b22039183a
User & Date: js on 2024-01-15 02:07:39
Other Links: manifest | tags
Context
2024-01-15
02:26
Merge support for URI DNS resource records check-in: e051d7d487 user: js tags: trunk
02:08
OFDNSResolver: Fix wrong shifts check-in: e7210cdbfd user: js tags: 1.0
02:07
OFDNSResolver: Fix wrong shifts check-in: 328252420b user: js tags: trunk
2024-01-14
11:47
Move out subclasses of OFDNSResourceRecord check-in: 487d5cbd83 user: js tags: trunk
Changes

Modified src/OFDNSResolver.m from [b89d5a3a8f] to [c017e2232c].

429
430
431
432
433
434
435
436
437


438
439
440

441
442
443
444
445
446
447
429
430
431
432
433
434
435


436
437
438
439

440
441
442
443
444
445
446
447







-
-
+
+


-
+







		uint32_t TTL;
		uint16_t dataLength;
		OFDNSResourceRecord *record;

		if (*i + 10 > length)
			@throw [OFTruncatedDataException exception];

		recordType = (buffer[*i] << 16) | buffer[*i + 1];
		DNSClass = (buffer[*i + 2] << 16) | buffer[*i + 3];
		recordType = (buffer[*i] << 8) | buffer[*i + 1];
		DNSClass = (buffer[*i + 2] << 8) | buffer[*i + 3];
		TTL = (buffer[*i + 4] << 24) | (buffer[*i + 5] << 16) |
		    (buffer[*i + 6] << 8) | buffer[*i + 7];
		dataLength = (buffer[*i + 8] << 16) | buffer[*i + 9];
		dataLength = (buffer[*i + 8] << 8) | buffer[*i + 9];

		*i += 10;

		if (*i + dataLength > length)
			@throw [OFTruncatedDataException exception];

		record = parseResourceRecord(name, DNSClass, recordType, TTL,