Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for directoryOffset (0.15 sec)

  1. src/archive/zip/reader.go

    		}
    	}
    
    	maxInt64 := uint64(1<<63 - 1)
    	if d.directorySize > maxInt64 || d.directoryOffset > maxInt64 {
    		return nil, 0, ErrFormat
    	}
    
    	baseOffset = directoryEndOffset - int64(d.directorySize) - int64(d.directoryOffset)
    
    	// Make sure directoryOffset points to somewhere in our file.
    	if o := baseOffset + int64(d.directoryOffset); o < 0 || o >= size {
    		return nil, 0, ErrFormat
    	}
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Sat Aug 03 01:05:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  2. src/archive/zip/struct.go

    }
    
    type directoryEnd struct {
    	diskNbr            uint32 // unused
    	dirDiskNbr         uint32 // unused
    	dirRecordsThisDisk uint64 // unused
    	directoryRecords   uint64
    	directorySize      uint64
    	directoryOffset    uint64 // relative to file
    	commentLen         uint16
    	comment            string
    }
    
    // timeZone returns a *time.Location based on the provided offset.
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue May 28 21:41:09 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  3. src/archive/zip/reader_test.go

    		}
    		if _, err := io.Copy(io.Discard, r); err != nil {
    			t.Fatalf("unexpected error: %v", err)
    		}
    	}
    }
    
    func TestBaseOffsetPlusOverflow(t *testing.T) {
    	// directoryOffset > maxInt64 && size-directoryOffset < 0
    	data := []byte{
    		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
    		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
    		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Jul 25 00:25:45 UTC 2024
    - 55.6K bytes
    - Viewed (0)
Back to top