Post Reply 
Proxo's Byte Limit...
Oct. 07, 2008, 04:04 PM
Post: #1
Proxo's Byte Limit...
http://www.castlecops.com/t227229-Patch_...9_999.html
Add Thank You Quote this message in a reply
Oct. 07, 2008, 04:48 PM
Post: #2
RE: Proxo's Byte Limit...
Could be useful for big scripts, thanks for sharing with us Wink
Add Thank You Quote this message in a reply
Jun. 29, 2017, 03:18 AM
Post: #3
RE: Proxo's Byte Limit...
I just ran into this limit (trying to sane-ify some page with over 64KB of CSS) and although the link in the OP is no longer alive due to the demise of CastleCops, I managed to retrieve a copy of the patch from the archive and have attached it here for future reference.

There is a hardcoded limit of 32767, which the patch simply changes to 99999, but I believe it should be OK to remove the limit completely and simply rely on common sense and your own discretion on how high you want to be (that didn't come out quite right... but you get the idea Big Teeth)

For those truly paranoid about running the patching executables, to effect the patch you can simply open a hex editor, search for
Code:
81 FB FF 7F 00 00 7E 05 BB FF 7F 00 00
which you should find at offset 0000AF99, and replace with
Code:
81 FB 9F 86 01 00 7E 05 BB 9F 86 01 00
      ^^^^^^^^^^^          ^^^^^^^^^^^
(The underlined bytes are the hardcoded limit. 00007fffh = 32767, and 0001869fh = 99999. What the code is doing is comparing the limit with the hardcoded one, and setting it to the latter if it exceeds.)

If you want to go the whole hog and remove the limit completely, change one byte to
Code:
81 FB FF 7F 00 00 EB 05 BB FF 7F 00 00
                  ^^
which basically bypasses the check completely. Enjoy responsibly Smile!

(It's not like I wouldn't know how to fix it, but it was nice to have a reference.)


Attached File(s)
.zip  patch_-byte_limit-_129.zip (Size: 4.42 KB / Downloads: 33)
Add Thank You Quote this message in a reply
[-] The following 3 users say Thank You to amy for this post:
chatterer, usr, zoltan
Jul. 16, 2017, 12:25 AM
Post: #4
RE: Proxo's Byte Limit...
Thanks for revisiting this.
What effect is bypassing the check completely supposed to have? I tried that using XVI32 hex editor to replace the 7E with EB. Afterward it won't allow anything higher than 99999 in the byte limit box and won't parse code beyond 99999 bytes when set that way. When left blank it reverts to 0. The only differences I encountered when patching was an "AF98" instead of "0000AF99" and an initial "81" in front of the "FB ..." code.

I'd like to go higher, but even at 99999 it's a significant improvement.
Add Thank You Quote this message in a reply
Jul. 22, 2017, 10:56 PM (This post was last modified: Jul. 22, 2017 10:57 PM by amy.)
Post: #5
RE: Proxo's Byte Limit...
The code as it exists originally was

Code:
byte_limit = GetDlgItemInt(...);
if(byte_limit > 32767)
    byte_limit = 32767;

and the patch basically gets rid of the last two lines, so it doesn't check anymore. From my testing it seems to work, but I haven't exhaustively tested all cases.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: