Hrmph. If a new helper is introduced anyway, wouldn't it be a better
idea to get rid of the hardcoded PATH_MAX limitation, perhaps using
strbuf_vaddf() or something in the implementation of this function?
Hrmph. If a new helper is introduced anyway, wouldn't it be a better
idea to get rid of the hardcoded PATH_MAX limitation, perhaps using
strbuf_vaddf() or something in the implementation of this function?
Hrmph. If a new helper is introduced anyway, wouldn't it be a better
idea to get rid of the hardcoded PATH_MAX limitation, perhaps using
strbuf_vaddf() or something in the implementation of this function?
Hrmph. If a new helper is introduced anyway, wouldn't it be a better
idea to get rid of the hardcoded PATH_MAX limitation, perhaps using
strbuf_vaddf() or something in the implementation of this function?
No, strbuf_release(&sb) frees 'sb.buf', causing 'path' to point to
unallocated memory. You can fix that by doing something along these
lines on top:
va_end(args);
- path = sb.buf;
+ path = xstrdup(cleanup_path(path));
strbuf_release(&sb);
- return xstrdup(cleanup_path(path));
+ return path;
}
No, strbuf_release(&sb) frees 'sb.buf', causing 'path' to point to
unallocated memory. You can fix that by doing something along these
lines on top:
va_end(args);
- path = sb.buf;
+ path = xstrdup(cleanup_path(path));
strbuf_release(&sb);
- return xstrdup(cleanup_path(path));
+ return path;
}
You are right, but I think you rather mean this, no?
va_end(args);
- path = sb.buf;
+ path = xstrdup(cleanup_path(sb.buf));
strbuf_release(&sb);
- return xstrdup(cleanup_path(path));
+ return path;
}
No, strbuf_release(&sb) frees 'sb.buf', causing 'path' to point to
unallocated memory. You can fix that by doing something along these
lines on top:
va_end(args);
- path = sb.buf;
+ path = xstrdup(cleanup_path(path));
strbuf_release(&sb);
- return xstrdup(cleanup_path(path));
+ return path;
}
You are right, but I think you rather mean this, no?
va_end(args);
- path = sb.buf;
+ path = xstrdup(cleanup_path(sb.buf));
strbuf_release(&sb);
- return xstrdup(cleanup_path(path));
+ return path;
}
Hrmph. If a new helper is introduced anyway, wouldn't it be a better
idea to get rid of the hardcoded PATH_MAX limitation, perhaps using
strbuf_vaddf() or something in the implementation of this function?
Ramsay Jones, what do you think about this ?
I think that I'm sorry for the late reply, I've been away ... :-D
I noticed your new series (v7 I think) which looked good (as far as the
mkpathdup() implementation is concerned) and I don't think it will tickle
the cygwin bug. (I haven't actually fetched that mail yet, I've only read
it using my ISPs web-mail interface, but will do so soon and test it on
cygwin).
Thanks!
ATB,
Ramsay Jones