Overview
Comment: | Better length checks for write / send calls |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
fc738019321eacc87bea62d5074e9cbf |
User & Date: | js on 2015-10-04 11:30:52 |
Other Links: | manifest | tags |
Context
2015-10-04
| ||
11:55 | Move OF_ASSUME_NONNULL_BEGIN after all includes check-in: 01088a20a4 user: js tags: trunk | |
11:30 | Better length checks for write / send calls check-in: fc73801932 user: js tags: trunk | |
11:11 | Special cases for the Wii's weird network stack check-in: 4cecf82254 user: js tags: trunk | |
Changes
Modified src/OFFile.m from [568732b489] to [b4e2a23749].
︙ | |||
233 234 235 236 237 238 239 | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | + + + - + - + - + | length: (size_t)length { if (_fd == -1 || _atEndOfStream) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length]; #ifndef _WIN32 if (length > SSIZE_MAX) @throw [OFOutOfRangeException exception]; |
︙ |
Modified src/OFProcess.m from [dc696d6c83] to [09488f3c9c].
︙ | |||
494 495 496 497 498 499 500 | 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | + + + - + - + | length: (size_t)length { #ifndef _WIN32 if (_writePipe[1] == -1 || _atEndOfStream) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length]; if (length > SSIZE_MAX) @throw [OFOutOfRangeException exception]; |
︙ |
Modified src/OFStdIOStream.m from [a3654b4d40] to [8e10193c2f].
︙ | |||
128 129 130 131 132 133 134 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | + + + - + - + - + | length: (size_t)length { if (_fd == -1 || _atEndOfStream) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length]; #ifndef _WIN32 if (length > SSIZE_MAX) @throw [OFOutOfRangeException exception]; |
︙ |
Modified src/OFStreamSocket.m from [d996f514e3] to [5f9b6a238d].
︙ | |||
97 98 99 100 101 102 103 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | + + + - + - + - + | if (_atEndOfStream) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length errNo: ENOTCONN]; #ifndef _WIN32 if (length > SSIZE_MAX) @throw [OFOutOfRangeException exception]; |
︙ |
Modified src/OFUDPSocket.m from [182b0b3dfd] to [3c90c2bfad].
︙ | |||
537 538 539 540 541 542 543 544 | 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | + + + - + + - + + | length: (size_t)length receiver: (const of_udp_socket_address_t*)receiver { if (_socket == INVALID_SOCKET) @throw [OFNotOpenException exceptionWithObject: self]; #ifndef _WIN32 if (length > SSIZE_MAX) @throw [OFOutOfRangeException exception]; if (sendto(_socket, buffer, length, 0, |
︙ |