Vladimir Kunschikov wrote: > >This "maxlen" business and the fallback error message are > >strange. We have roughly equivalent code in pg_basebackup.c > >which has been working since 2011 > >Perhaps you can drop the memchr/fallback tricks and adopt the > >pg_basebackup coding? Or is there a specific reason to have > >the memchr check? > > Ofcourse that tricks can be dropped, function will be much prettier. > 'Tricks' were made to pass some strict internal tests.
Well, if there are cases which cause zlib to return a message that causes a crash when printing it or some other problem, then let's use your version both in this new code and in pg_basebackup. Do these cases really exist?