Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 2015 19:26:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 196694] libmd doesn't detect EOF properly; can get stuck in an infinite loop in MDXFileChunk
Message-ID:  <bug-196694-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196694

            Bug ID: 196694
           Summary: libmd doesn't detect EOF properly; can get stuck in an
                    infinite loop in MDXFileChunk
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: ngie@FreeBSD.org

Created attachment 151578
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=151578&action=edit
Patch for fixing the md5 infinite loop

read(2) can return 0 if an EOF is encountered. The problem is that the loop in
MDXFileChunk doesn't account for this, so any callers of the API can encounter
an infinite loop on EOF (which includes md5).

The attached patch addresses this issue.

Sponsored by: EMC / Isilon Storage Division

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-196694-8>