Bug #11

crash in command.c

Added by Lucas Meijer over 10 years ago. Updated over 10 years ago.

Status:ClosedStart date:02/27/2009
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Hey,

This changeset 7241446bd7e34ea0ca381341aeebfbeec99f222b broke jam for me. In my project I get a jam crash.

The crash happens in command.c on line 257.
expandedsubbufsize is -1 at this point, because apparently the previous cmd_string() call failed.
The result from that call is not checked, and fed into tmp_write, followed by an unhandled exception shortly after.

I haven't figured out why -1 got returned in the first place, but a check on the cmd_string return value is in place.

History

#1 Updated by Lucas Meijer over 10 years ago

Update:

when patching jamplus to properly deal with the -1 returncode from cmd_string (which happened because the cmd_string length > 10240), jam stops crashing, and instead nicely reports "Link actions too long (max 1024)!"

which is a bit annoying, but not jam's fault :)

#2 Updated by Joshua Jensen over 10 years ago

There is no maximum command line size when dealing with response files. This appears to be a bad copy/paste.

Try changing:

expandedsubbuffsize = cmd_string(rule, buffer_ptr(&subbuff), &expandedsubbuff, outsize, lol, response_files, cmd);

to:

expandedsubbuffsize = cmd_string(rule, buffer_ptr(&subbuff), &expandedsubbuff, INT_MAX, lol, response_files, cmd);

Let me know how that works for you.

Thanks.

#3 Updated by Joshua Jensen over 10 years ago

  • Status changed from New to Closed

Also available in: Atom PDF