Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for readSpecialFile (0.15 sec)

  1. src/archive/tar/reader.go

    		var nn int
    		nn, err = r.Read(b[n:])
    		n += nn
    	}
    	if len(b) == n && err == io.EOF {
    		err = nil
    	}
    	return n, err
    }
    
    // readSpecialFile is like io.ReadAll except it returns
    // ErrFieldTooLong if more than maxSpecialFileSize is read.
    func readSpecialFile(r io.Reader) ([]byte, error) {
    	buf, err := io.ReadAll(io.LimitReader(r, maxSpecialFileSize+1))
    	if len(buf) > maxSpecialFileSize {
    		return nil, ErrFieldTooLong
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Mar 08 01:59:14 UTC 2024
    - 26.8K bytes
    - Viewed (0)
Back to top