pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/30677: ogmtools has bogus alginment/packing assumptions



>Number:         30677
>Category:       pkg
>Synopsis:       ogmtools has bogus alginment/packing assumptions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 06 16:59:01 +0000 2005
>Originator:     Martin Husemann
>Release:        NetBSD 3.99.7
>Organization:
>Environment:
System: NetBSD nelly.aprisoft.de 3.99.7 NetBSD 3.99.7 (NELLY) #12: Thu Jun 30 
21:05:24 CEST 2005 
martin%nelly.aprisoft.de@localhost:/usr/src/sys/arch/sparc64/compile/NELLY 
sparc64
Architecture: sparc64
Machine: sparc64
>Description:

On certain ogm files, the tool ogminfo from multimedia/ogmtools can not
identify streams. This happens, because the header size (as encoded in
the header) does not seem sufficient when compared to the 
sizeof(old_stream_header) - because the compiler might add alginment add
the end of the structure on somer archs. This probably is the reason that
the otherwise identical struct stream_header has grown an additional

  ogg_int16_t padding;

at the end.

In the case I looked at, this if did not hit (line 342 of ogminfo.c):

    } else if (((*pack.packet & PACKET_TYPE_BITS ) == PACKET_TYPE_HEADER) &&
               (pack.bytes >= (int)(sizeof(old_stream_header) + 1))) {

because pack.bytes was 53, but sizeof(old_stream_header) was 56.

I didn't look for other instances of this problem in the pkg, but there
likely are some:

fgrep old_stream_header * | fgrep sizeof | wc -l
    6

>How-To-Repeat:
Run ogminfo on strict alignement archs/code inspection.
>Fix:
Probably report to upstream maintainers?




Home | Main Index | Thread Index | Old Index