Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for ErrFieldTooLong (0.3 sec)

  1. src/archive/tar/strconv.go

    		return string(b[:i])
    	}
    	return string(b)
    }
    
    // formatString copies s into b, NUL-terminating if possible.
    func (f *formatter) formatString(b []byte, s string) {
    	if len(s) > len(b) {
    		f.err = ErrFieldTooLong
    	}
    	copy(b, s)
    	if len(s) < len(b) {
    		b[len(s)] = 0
    	}
    
    	// Some buggy readers treat regular files with a trailing slash
    	// in the V7 path field as a directory even though the full path
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 01 14:28:42 UTC 2023
    - 9K bytes
    - Viewed (0)
  2. src/archive/tar/reader.go

    	}
    	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
    	}
    	return buf, err
    }
    
    // discard skips n bytes in r, reporting an error if unable to do so.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 01:59:14 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  3. src/archive/tar/writer_test.go

    		h:    &Header{PAXRecords: map[string]string{"GOLANG.x": strings.Repeat("a", maxSpecialFileSize)}},
    	}} {
    		w := NewWriter(io.Discard)
    		if err := w.WriteHeader(test.h); err != ErrFieldTooLong {
    			t.Errorf("%v: w.WriteHeader() = %v, want ErrFieldTooLong", test.name, err)
    		}
    	}
    }
    
    // testNonEmptyWriter wraps an io.Writer and ensures that
    // Write is never called with an empty buffer.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 38.7K bytes
    - Viewed (0)
  4. src/archive/tar/writer.go

    		} else {
    			dir, file := path.Split(realName)
    			name = path.Join(dir, "PaxHeaders.0", file)
    			flag = TypeXHeader
    		}
    		data := buf.String()
    		if len(data) > maxSpecialFileSize {
    			return ErrFieldTooLong
    		}
    		if err := tw.writeRawFile(name, data, flag, FormatPAX); err != nil || isGlobal {
    			return err // Global headers return here
    		}
    	}
    
    	// Pack the main header.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  5. src/archive/tar/common.go

    var tarinsecurepath = godebug.New("tarinsecurepath")
    
    var (
    	ErrHeader          = errors.New("archive/tar: invalid tar header")
    	ErrWriteTooLong    = errors.New("archive/tar: write too long")
    	ErrFieldTooLong    = errors.New("archive/tar: header field too long")
    	ErrWriteAfterClose = errors.New("archive/tar: write after close")
    	ErrInsecurePath    = errors.New("archive/tar: insecure file path")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 15 16:01:50 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  6. src/archive/tar/reader_test.go

    			},
    			Format: FormatPAX,
    		}},
    	}, {
    		file: "testdata/pax-bad-hdr-file.tar",
    		err:  ErrHeader,
    	}, {
    		file: "testdata/pax-bad-hdr-large.tar.bz2",
    		err:  ErrFieldTooLong,
    	}, {
    		file: "testdata/pax-bad-mtime-file.tar",
    		err:  ErrHeader,
    	}, {
    		file: "testdata/pax-pos-size-file.tar",
    		headers: []*Header{{
    			Name:     "foo",
    			Mode:     0640,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 21 21:14:38 UTC 2022
    - 47.1K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*Writer).AddFS", Method, 22},
    		{"(*Writer).Close", Method, 0},
    		{"(*Writer).Flush", Method, 0},
    		{"(*Writer).Write", Method, 0},
    		{"(*Writer).WriteHeader", Method, 0},
    		{"(Format).String", Method, 10},
    		{"ErrFieldTooLong", Var, 0},
    		{"ErrHeader", Var, 0},
    		{"ErrInsecurePath", Var, 20},
    		{"ErrWriteAfterClose", Var, 0},
    		{"ErrWriteTooLong", Var, 0},
    		{"FileInfoHeader", Func, 1},
    		{"Format", Type, 10},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  8. api/go1.txt

    pkg archive/tar, type Header struct, Uid int
    pkg archive/tar, type Header struct, Uname string
    pkg archive/tar, type Reader struct
    pkg archive/tar, type Writer struct
    pkg archive/tar, var ErrFieldTooLong error
    pkg archive/tar, var ErrHeader error
    pkg archive/tar, var ErrWriteAfterClose error
    pkg archive/tar, var ErrWriteTooLong error
    pkg archive/zip, const Deflate uint16
    pkg archive/zip, const Store uint16
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top