in reply to ID3v2 TAG unpack uninitialized value
You are reading 4 bytes:
read( FH , $lines, 4 ); # Read 32 bits (4 Bytes) and store the data in + $lines Size (4 Bytes Size).
And then attempting to unpack four x 4-byte integers ("I I I I"):
( $lines_1, $lines_2, $lines_3, $lines_4 ) = unpack ( "I I I I" , + $lines ); # (I) An unsigned integer.
Fix: read enough data to satisfy the unpack template (ie. 16 bytes):
read( FH , $lines, 16 ); # Read 4x 32 bits (4 Bytes) and store the dat +a in $lines Size (16 Bytes Size). ( $lines_1, $lines_2, $lines_3, $lines_4 ) = unpack ( "I I I I" , + $lines ); # (I I I I ) FOUR unsigned integer(S).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: ID3v2 TAG unpack uninitialized value
by no_slogan (Deacon) on Jan 05, 2014 at 15:46 UTC | |
by thanos1983 (Parson) on Jan 06, 2014 at 00:06 UTC | |
|
Re^2: ID3v2 TAG unpack uninitialized value
by thanos1983 (Parson) on Jan 05, 2014 at 23:42 UTC | |
by BrowserUk (Patriarch) on Jan 06, 2014 at 00:30 UTC | |
by thanos1983 (Parson) on Jan 06, 2014 at 04:59 UTC | |
by BrowserUk (Patriarch) on Jan 06, 2014 at 07:00 UTC |