Re: [PATCH 60/68] prefer memcpy to strcpy

2015-09-28 Thread Rasmus Villemoes
On Thu, Sep 24 2015, Jeff King wrote: > This also eliminates calls to strcpy, which make auditing > the code base harder. Maybe may English parser is broken, but this doesn't immediately sound like what you meant to say. Also, in 29/68 you say "We drop calls to strcpy, which

Re: [PATCH 60/68] prefer memcpy to strcpy

2015-09-27 Thread René Scharfe
Am 27.09.2015 um 15:06 schrieb Torsten Bögershausen: On 2015-09-27 13.19, René Scharfe wrote: Am 24.09.2015 um 23:08 schrieb Jeff King: When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that

Re: [PATCH 60/68] prefer memcpy to strcpy

2015-09-27 Thread Torsten Bögershausen
On 2015-09-27 13.19, René Scharfe wrote: > Am 24.09.2015 um 23:08 schrieb Jeff King: >> When we already know the length of a string (e.g., because >> we just malloc'd to fit it), it's nicer to use memcpy than >> strcpy, as it makes it more obvious that we are not going to >> overflow the buffer

Re: [PATCH 60/68] prefer memcpy to strcpy

2015-09-27 Thread René Scharfe
Am 27.09.2015 um 15:13 schrieb René Scharfe: Am 27.09.2015 um 15:06 schrieb Torsten Bögershausen: On 2015-09-27 13.19, René Scharfe wrote: Am 24.09.2015 um 23:08 schrieb Jeff King: When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy

Re: [PATCH 60/68] prefer memcpy to strcpy

2015-09-27 Thread René Scharfe
Am 24.09.2015 um 23:08 schrieb Jeff King: When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the

[PATCH 60/68] prefer memcpy to strcpy

2015-09-24 Thread Jeff King
When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to