Re: [PATCH] Git segmentation faults if submodule path is empty.

2013-08-19 Thread Jharrod LaFon
Updated the patch and the patch submission. -- 8 -- Git segmentation faults if submodule path is empty. Git fails due to a segmentation fault if a submodule path is empty. Here is an example .gitmodules that will cause a segmentation fault: [submodule foo-module] path

Re: [PATCH] Git segmentation faults if submodule path is empty.

2013-08-19 Thread Junio C Hamano
Jharrod LaFon jla...@eyesopen.com writes: Updated the patch and the patch submission. Getting a lot warmer ;-). -- 8 -- Git segmentation faults if submodule path is empty. If this is meant to replace the MUA's Subject: line, then please add Subject: prefix, like the example at the end

Re: [PATCH] Git segmentation faults if submodule path is empty.

2013-08-19 Thread Jeff King
On Mon, Aug 19, 2013 at 11:56:17AM -0700, Junio C Hamano wrote: Jharrod LaFon jla...@eyesopen.com writes: Updated the patch and the patch submission. Getting a lot warmer ;-). Thanks, I agree with all of the stuff you said. The end result that you included looks good to me. -Peff --

Re: [PATCH] Git segmentation faults if submodule path is empty.

2013-08-19 Thread Junio C Hamano
Jharrod LaFon jla...@eyesopen.com writes: I will keep trying this until it's perfect, and I thank you for the help. When I resubmit this, would you like me to include your sign-off line as well? If the one I attached at the end of the message you are responding to looks fine to you, I'd just

Re: [PATCH] Git segmentation faults if submodule path is empty.

2013-08-19 Thread Jharrod LaFon
It looks great to me. Thanks, -- Jharrod LaFon OpenEye Scientific Software On Aug 19, 2013, at 2:54 PM, Junio C Hamano gits...@pobox.com wrote: Jharrod LaFon jla...@eyesopen.com writes: I will keep trying this until it's perfect, and I thank you for the help. When I resubmit this, would

Re: [PATCH] Git segmentation faults if submodule path is empty.

2013-08-16 Thread Jens Lehmann
Am 16.08.2013 03:51, schrieb Jharrod LaFon: Git fails due to a segmentation fault if a submodule path is empty. Here is an example .gitmodules that will cause a segmentation fault: [submodule foo-module] path url = http://host/repo.git $ git status Segmentation fault (core dumped)

Re: [PATCH] Git segmentation faults if submodule path is empty.

2013-08-16 Thread Thomas Rast
Jharrod LaFon jla...@eyesopen.com writes: Git fails due to a segmentation fault if a submodule path is empty. Here is an example .gitmodules that will cause a segmentation fault: [submodule foo-module] path url = http://host/repo.git $ git status Segmentation fault (core dumped)

Re: [PATCH] Git segmentation faults if submodule path is empty.

2013-08-16 Thread Jeff King
On Fri, Aug 16, 2013 at 08:48:43AM +0200, Jens Lehmann wrote: This patch addresses the issue by returning from the function if 'value' is null before the call to xstrdup is made. Hmm, I'm not sure silently ignoring the misconfiguration is the best way to go. A submodule config having a

Re: [PATCH] Git segmentation faults if submodule path is empty.

2013-08-16 Thread Jeff King
On Fri, Aug 16, 2013 at 09:09:58AM -0400, Jeff King wrote: - if (parse_config_key(var, submodule, name, namelen, key) 0 || !name) + if (parse_config_key(var, submodule, name, namelen, key) 0 || !name || !value) return 0; I think this is also the wrong place to make

Re: [PATCH] Git segmentation faults if submodule path is empty.

2013-08-16 Thread Jharrod LaFon
OK, I'll incorporate Jeff's changes, add a test and resubmit the patch. Thanks, -- Jharrod LaFon OpenEye Scientific Software On Aug 16, 2013, at 7:14 AM, Jeff King p...@peff.net wrote: On Fri, Aug 16, 2013 at 09:09:58AM -0400, Jeff King wrote: - if (parse_config_key(var, submodule, name,

Re: [PATCH] Git segmentation faults if submodule path is empty.

2013-08-16 Thread Jharrod LaFon
Here is an updated patch with a test. Git fails due to a segmentation fault if a submodule path is empty. Here is an example .gitmodules that will cause a segmentation fault: [submodule foo-module] path url = http://host/repo.git $ git status Segmentation fault (core dumped) This occurs

Re: [PATCH] Git segmentation faults if submodule path is empty.

2013-08-16 Thread Jeff King
On Fri, Aug 16, 2013 at 10:59:35AM -0700, Jharrod LaFon wrote: Here is an updated patch with a test. Bits like this that should not be part of the commit message should either go after the --- lines near the diffstat, or should come before a scissors line, like: Here is my new patch. -- 8

[PATCH] Git segmentation faults if submodule path is empty.

2013-08-15 Thread Jharrod LaFon
Git fails due to a segmentation fault if a submodule path is empty. Here is an example .gitmodules that will cause a segmentation fault: [submodule foo-module] path url = http://host/repo.git $ git status Segmentation fault (core dumped) This occurs because in the function