git: libc - fix handling of temporary file used by hash(3)

YONETANI Tomokazu y0netan1 at
Thu Feb 3 20:31:22 PST 2011

commit e90a7c45c3303ed54c0fde732b2ba32dc80ffd9b
Author: YONETANI Tomokazu <y0netan1 at>
Date:   Thu Feb 3 14:29:48 2011 +0900

    libc - fix handling of temporary file used by hash(3)
    This fixes applications using DB_HASH, such as tsort, to unexpectedly
    try to open a temporary file in the current directory and fail if it
    has no write permission there.
    Obtained from FreeBSD, r190485, by delphij:
      db/btree/bt_open.c: check return value of snprintf() and return value
      if the result is truncated.
      db/hash/hash_page.c: use the same way to create temporary file as
      bt_open.c; check snprintf() return value.
      Obtained from:  OpenBSD

Summary of changes:
 lib/libc/db/btree/bt_open.c  |    8 ++++++--
 lib/libc/db/hash/hash_page.c |   19 +++++++++++++++----
 2 files changed, 21 insertions(+), 6 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list