• Tom Lane's avatar
    Fix some dubious WAL-parsing code. · b01f32c3
    Tom Lane authored
    Coverity complained about possible buffer overrun in two places added by
    commit 1eb6d652, and AFAICS it's reasonable to worry: even granting that
    the WAL originator properly truncated the commit GID to GIDSIZE, we should
    not really bet our lives on that having the same value as it does in the
    current build.  Hence, use strlcpy() not strcpy(), and adjust the pointer
    advancement logic to be sure we skip over the whole source string even if
    strlcpy() truncated it.
    b01f32c3
xactdesc.c 8.92 KB