[Bug 45810] WINEPATH maximums

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Sep 15 15:44:43 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=45810

Jason Edmeades <us at edmeades.me.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |us at edmeades.me.uk
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Jason Edmeades <us at edmeades.me.uk> ---
Hi Aaron - I guess my first question is what does this break? Basically, can
you give me a justification of why we should fix this other than it being
something you stumbled upon. If there's a valid application requiring it, we
can sort it...

Note that setx etc is limited to 1024 characters apparently
(https://superuser.com/questions/387619/overcoming-the-1024-character-limit-with-setx)
and so going over 1024 characters will start to break some scripts on windows
anyway.

The problem is easily worked around - there's a 1024 limit in
"set_registry_variables" (dlls\kernel32\process.c) and if you change both the
1024 to 2048 for example, then the issue you are seeing goes away. 

However the comment for that function says that window happily truncates
environment variables in the registry to 1024, but you could argue nothing
sensible would ever rely on such truncation.

Some interesting reading at:
https://software.intel.com/en-us/articles/limitation-to-the-length-of-the-system-path-variable
Sounds like 2048 is a more sensible limit as things start breaking there, and
it is unlikely that people expect the broken behaviour of truncation anyway.

(Also referencing
https://support.microsoft.com/en-gb/help/830473/command-prompt-cmd-exe-command-line-string-limitation
for the future)

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list