On 6/20/2012 8:13 AM, Cyril Roelandt wrote: > On 06/20/2012 05:20 AM, Barry deFreese wrote: >> Hi again, >> >> Here is a simple little patch to build pong2 (uses PATH_MAX). >> >> Let me know if this looks sane. >> > > > Why not do this : > > size = strlen(...) + 1; > filename = malloc(size); > #ifdef PATH_MAX > if (size > PATH_MAX) > handle_error(); > #endif > snprintf(filename, size, ...); > > This avoids duplicating the whole "if (writer) ... else ..." thing, plus we > do not check whether > __GLIBC__ is defined. I think it would be more likely to be accepted upstream. > > Cyril. > > Cyril,
Thanks but what are you doing there if you overrun the size of filename (not that they are handling it now either but PATH_MAX is fairly large). Thanks again, Barry -- To UNSUBSCRIBE, email to debian-hurd-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4fe1c3fa.2020...@verizon.net