Commit 25a1ca4
committed
[WINA-2940] Report per-scope CSE truncation, and fix the bounds comments
The invocation cap dropped what it cut silently while the GPO cap next to it
reported GPOsOmitted, so the payload annotated one cap and not the other. Add
computer_cses_omitted / user_cses_omitted, omitempty and therefore free on
every payload that does not overflow.
The cap has less headroom than "backstop" implied: a stock Windows 11 26200
registers 57 client-side extensions under Winlogon\GPExtensions, seven below
the cap of 64, and third-party extensions register into the same key.
The byte-limit comment claimed one rationale for two constants that have
different origins - 128 cannot be a 256-character budget under any encoding -
and "worst UTF-8 case" understated it, since 512 is two bytes per character
rather than the three or four a worst case implies. Each constant now carries
its own derivation.
Also guard seven unchecked slice indexes in the tests. Indexing before
establishing the length turns a one-assertion regression into a panic that
aborts the whole test binary and names an indexing expression rather than the
invariant that broke. TestGPOMultiplePerCSE additionally states the ordering
its [1] depends on instead of assuming it.
TestSubmitEvent_WorstCasePayloadSize carries both new fields, so they sit
inside the one byte budget that couples the four caps: 2,373,788 bytes of
3,000,000, up 54 bytes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 1b48a23 commit 25a1ca4
3 files changed
Lines changed: 73 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
39 | | - | |
| 43 | + | |
| 44 | + | |
40 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
41 | 51 | | |
42 | 52 | | |
43 | 53 | | |
| |||
63 | 73 | | |
64 | 74 | | |
65 | 75 | | |
66 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
67 | 82 | | |
68 | 83 | | |
69 | 84 | | |
| |||
257 | 272 | | |
258 | 273 | | |
259 | 274 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
265 | 278 | | |
266 | 279 | | |
267 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
268 | 286 | | |
269 | 287 | | |
270 | | - | |
271 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
272 | 291 | | |
273 | | - | |
| 292 | + | |
274 | 293 | | |
275 | 294 | | |
276 | 295 | | |
277 | | - | |
| 296 | + | |
278 | 297 | | |
279 | 298 | | |
280 | 299 | | |
| |||
291 | 310 | | |
292 | 311 | | |
293 | 312 | | |
| 313 | + | |
294 | 314 | | |
| 315 | + | |
295 | 316 | | |
296 | 317 | | |
297 | 318 | | |
| |||
303 | 324 | | |
304 | 325 | | |
305 | 326 | | |
306 | | - | |
| 327 | + | |
307 | 328 | | |
308 | 329 | | |
309 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
| |||
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
202 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
203 | 207 | | |
204 | 208 | | |
205 | 209 | | |
| |||
350 | 354 | | |
351 | 355 | | |
352 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
353 | 365 | | |
354 | 366 | | |
355 | 367 | | |
| |||
445 | 457 | | |
446 | 458 | | |
447 | 459 | | |
448 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
449 | 463 | | |
450 | 464 | | |
451 | 465 | | |
| |||
526 | 540 | | |
527 | 541 | | |
528 | 542 | | |
529 | | - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
530 | 546 | | |
531 | 547 | | |
532 | 548 | | |
| |||
543 | 559 | | |
544 | 560 | | |
545 | 561 | | |
| 562 | + | |
| 563 | + | |
546 | 564 | | |
547 | 565 | | |
548 | 566 | | |
549 | 567 | | |
550 | | - | |
| 568 | + | |
551 | 569 | | |
552 | 570 | | |
553 | 571 | | |
| |||
580 | 598 | | |
581 | 599 | | |
582 | 600 | | |
583 | | - | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
584 | 605 | | |
585 | 606 | | |
586 | 607 | | |
| |||
597 | 618 | | |
598 | 619 | | |
599 | 620 | | |
600 | | - | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
601 | 624 | | |
602 | 625 | | |
603 | 626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| 425 | + | |
425 | 426 | | |
426 | 427 | | |
427 | 428 | | |
| |||
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
462 | | - | |
463 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
464 | 470 | | |
465 | 471 | | |
466 | 472 | | |
| |||
0 commit comments