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: 705)
Add Thank You Quote this message in a reply
[-] The following 4 users say Thank You to amy for this post:
chatterer, usr, zoltan, mizzmona
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
Dec. 24, 2018, 02:53 AM
Post: #6
RE: Proxo's Byte Limit...
Is there a patch for proxo's Replace max byte limit?
Add Thank You Quote this message in a reply
Dec. 24, 2018, 04:57 AM
Post: #7
RE: Proxo's Byte Limit...
(Dec. 24, 2018 02:53 AM)referrer Wrote:  Is there a patch for proxo's Replace max byte limit?
Are you referring to the 64K maximum for replacement expressions? If so, that's not something that could be easily patched --- there are 16-bit length values everywhere in the code. I believe you can use the $FILE() command to include longer replacement content.

(One of the work items I still have logged for Proxomitron Reborn is "remove 64K limits".)
Add Thank You Quote this message in a reply
Dec. 24, 2018, 08:25 AM (This post was last modified: Dec. 24, 2018 11:02 AM by referrer.)
Post: #8
RE: Proxo's Byte Limit...
(Dec. 24, 2018 04:57 AM)amy Wrote:  
(Dec. 24, 2018 02:53 AM)referrer Wrote:  Is there a patch for proxo's Replace max byte limit?
Are you referring to the 64K maximum for replacement expressions? If so, that's not something that could be easily patched --- there are 16-bit length values everywhere in the code. I believe you can use the $FILE() command to include longer replacement content.

(One of the work items I still have logged for Proxomitron Reborn is "remove 64K limits".)
There's a 4096 character limit in proxo's replacement string.
Proxo cannot insert more than 4096 character to page directly.

"Replacement Text" In "HTML Web Page Filter Editor" window can only input or show 4095 character, the same limit when read from config or save to config.
Save a replacement string more than 4096 will be chopped off and the first 4095 character will be auto split into three line(2047 2047 and 1) then saved.
Add Thank You Quote this message in a reply
Dec. 25, 2018, 10:25 PM
Post: #9
RE: Proxo's Byte Limit...
There's a 4K line-length limit in config files in general, a 4K limit on patterns, a 2K limit on URL matches, and a 260 limit on bounds matches. Raising them varies in difficulty from moderate to "rewrite the pattern matching engine" because there's assumptions on lengths in many places in the code, and blindly making the limits higher is likely to cause crashes instead.
Add Thank You Quote this message in a reply
[-] The following 1 user says Thank You to amy for this post:
referrer
Dec. 26, 2018, 12:06 AM
Post: #10
RE: Proxo's Byte Limit...
(Dec. 25, 2018 10:25 PM)amy Wrote:  There's a 4K line-length limit in config files in general, a 4K limit on patterns, a 2K limit on URL matches, and a 260 limit on bounds matches. Raising them varies in difficulty from moderate to "rewrite the pattern matching engine" because there's assumptions on lengths in many places in the code, and blindly making the limits higher is likely to cause crashes instead.
Thank you for all the details.
I've tried use a DBG to raise them varies and get failed many times(100+) last two days.
Now I can giveup because it's too difficult for me.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: