VirtualBox

Changeset 40821 in vbox for trunk/src/VBox/Storage


Ignore:
Timestamp:
Apr 7, 2012 9:15:33 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
77336
Message:

vbox-img: Fix hang when using stdin and the producer in the pipe aborts with an error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/testcase/vbox-img.cpp

    r40240 r40821  
    442442        pFS->offBuffer = 0;
    443443        pFS->cbBuffer = cbSumRead;
     444        if (!cbSumRead && !pcbRead) /* Caller can't handle partial reads. */
     445            return VERR_EOF;
    444446    }
    445447
     
    484486        cbBuffer -= cbThisRead;
    485487        cbTotalRead += cbThisRead;
     488        if (!cbTotalRead && !pcbRead) /* Caller can't handle partial reads. */
     489            return VERR_EOF;
    486490    } while (cbBuffer > 0);
    487491
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette