RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 11-Apr-2016 00:17:10 Branch: rpm-5_4 Handle: 2016041022171000 Modified files: (Branch: rpm-5_4) rpm/rpmio rpmdav.c Log: - rpmdav: turn an assert into an error return for fuzzing manifests. Summary: Revision Changes Path 2.119.2.19 +9 -1 rpm/rpmio/rpmdav.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/rpmio/rpmdav.c ============================================================================ $ cvs diff -u -r2.119.2.18 -r2.119.2.19 rpmdav.c --- rpm/rpmio/rpmdav.c 11 May 2015 21:10:18 -0000 2.119.2.18 +++ rpm/rpmio/rpmdav.c 10 Apr 2016 22:17:10 -0000 2.119.2.19 @@ -664,7 +664,7 @@ { const char * path = NULL; int ut = urlPath(u->url, &path); - int rc; + int rc = NE_CONNECT; /* assume failure */ DAVDEBUG(-1, (stderr, "--> %s(%p) url %s\n", __FUNCTION__, u, u->url)); @@ -684,9 +684,17 @@ /* ======================= */ /* HACK: where should server capabilities be read? */ +#ifdef DYING assert(path && *path == '/'); if (path == NULL || *path == '\0') path = "/"; +#else + if (path == NULL || *path == '\0') { + errno = ENOENT; /* HACK: errno same as non-existent path. */ + rc = NE_CONNECT; + goto exit; + } +#endif #ifdef NOTYET /* XXX too many new directories while recursing. */ /* Repeat OPTIONS for new directories. */ @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org