On 09/27/2010 08:52 PM, Pete Zaitcev wrote:
Our current tests do not invoke hstor_keys at all, and so they did not catch
a crash with double free in append_qparam.
Add a very basic test which at least calls hstor_keys to verify that it
does not crash right away. This test does not excercise comp
On 09/27/2010 08:49 PM, Pete Zaitcev wrote:
Premature optimization is the root of all evil.
Use a sensible convention of not screwing with the argument, at the expense
of extra strdup.
Fortunately, all users are confined to Hail itself, even if huri_field_escape
is exported.
Signed-off-by: Pet
Our current tests do not invoke hstor_keys at all, and so they did not catch
a crash with double free in append_qparam.
Add a very basic test which at least calls hstor_keys to verify that it
does not crash right away. This test does not excercise complex modes
such as S3 paging, but better this t
Premature optimization is the root of all evil.
Use a sensible convention of not screwing with the argument, at the expense
of extra strdup.
Fortunately, all users are confined to Hail itself, even if huri_field_escape
is exported.
Signed-off-by: Pete Zaitcev
---
include/hstor.h |2 +-
li
On Mon, 27 Sep 2010 12:53:48 -0400
Jeff Garzik wrote:
> > - stmp = huri_field_escape(strdup(val), QUERY_ESCAPE_MASK);
> > + v = strdup(val);
> > + stmp = huri_field_escape(v, QUERY_ESCAPE_MASK);
> > str = g_string_append(str, stmp);
> > free(stmp);
> > + free(v);
>
> applied
I'm
On 09/27/2010 12:29 PM, Pete Zaitcev wrote:
On Mon, 27 Sep 2010 10:53:06 +0200
Jim Meyering wrote:
- stmp = huri_field_escape(strdup(val), QUERY_ESCAPE_MASK);
+ v = strdup(val);
+ stmp = huri_field_escape(v, QUERY_ESCAPE_MASK);
str = g_string_append(str, stmp);
Pete Zaitcev wrote:
> On Mon, 27 Sep 2010 10:53:06 +0200
> Jim Meyering wrote:
>
>> -stmp = huri_field_escape(strdup(val), QUERY_ESCAPE_MASK);
>> +v = strdup(val);
>> +stmp = huri_field_escape(v, QUERY_ESCAPE_MASK);
>> str = g_string_append(str, stmp);
>> free(stmp);
>> +
On 09/27/2010 04:53 AM, Jim Meyering wrote:
Signed-off-by: Jim Meyering
---
I would have preferred to insert a single line right before the
huri_field_escape call:
char *v = strdup(val);
[would result in a more compact, single-hunk patch]
but it looks like hail uses the anachronistic (pr
On Mon, 27 Sep 2010 10:53:06 +0200
Jim Meyering wrote:
> - stmp = huri_field_escape(strdup(val), QUERY_ESCAPE_MASK);
> + v = strdup(val);
> + stmp = huri_field_escape(v, QUERY_ESCAPE_MASK);
> str = g_string_append(str, stmp);
> free(stmp);
> + free(v);
I think you may
Signed-off-by: Jim Meyering
---
I would have preferred to insert a single line right before the
huri_field_escape call:
char *v = strdup(val);
[would result in a more compact, single-hunk patch]
but it looks like hail uses the anachronistic (pre-C99)
"declare all vars at outer scope" style
10 matches
Mail list logo