Re: [PATCH/RFH] pp_header(): work around possible memory corruption

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH/RFH] pp_header(): work around possible memory corruption

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:17

At least the older humongous pretty_print_commit() got separated
into manageable chunks, and I was happy.  I was just too lazy
when refactoring the code and stopped there.

The right fix is to propagate the "realloc as needed" callchain
into add_user_info(), instead of having "this should be enough"
there.  These two you touched are the only two callsite of that
static function.

Re: [PATCH/RFH] pp_header(): work around possible memory corruption

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:17

Hi,

On Fri, 15 Jun 2007, Junio C Hamano wrote:
At least the older humongous pretty_print_commit() got separated into 
manageable chunks, and I was happy.  I was just too lazy when 
refactoring the code and stopped there.
That's perfectly okay. This is why you parked it in 'next', I guess.
The right fix is to propagate the "realloc as needed" callchain into 
add_user_info(), instead of having "this should be enough" there.  
These two you touched are the only two callsite of that static function.
Right. As I said, I was in a hurry, and could not research it properly. 
Besides, now that you gave me the proper pointer, I can take care about it 
tomorrow, unless somebody else is faster.

Ciao,
Dscho

Re: [PATCH/RFH] pp_header(): work around possible memory corruption

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:18

Hi,

On Fri, 15 Jun 2007, Junio C Hamano wrote:
At least the older humongous pretty_print_commit() got separated into 
manageable chunks, and I was happy.  I was just too lazy when 
refactoring the code and stopped there.
Understandable.
The right fix is to propagate the "realloc as needed" callchain into 
add_user_info(), instead of having "this should be enough" there.  
These two you touched are the only two callsite of that static function.
I had a go at this, but unfortunately I do not understand enough of what 
is going on there. For example, add_rfc2047() sometimes quotes some text. 
I have no idea what a conservative estimate of the growth is, so I cannot 
continue there.

Sorry,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help