This file is indexed.

/usr/bin/oggz-diff is in oggz-tools 1.1.1-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
#!/bin/sh

## Copyright (C) 2003 Commonwealth Scientific and Industrial Research
## Organisation (CSIRO) Australia
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
## are met:
##
## - Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
##
## - Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in the
## documentation and/or other materials provided with the distribution.
##
## - Neither the name of CSIRO Australia nor the names of its
## contributors may be used to endorse or promote products derived from
## this software without specific prior written permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
## ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
## PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ORGANISATION OR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
## LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
## NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
## SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

version () {
  echo >&2 "oggz-diff version "1.1.1
  exit 1
}

usage () {
  echo >&2 "oggz-diff, diff oggz-dumps of two Ogg files."
  echo >&2
  echo >&2 "Usage: oggz-diff [options] [OGGZDUMP_OPTIONS] [DIFF_OPTIONS] file1.ogg file2.ogg"
  echo >&2
  echo >&2 "options: [--verbose] [-v | --version] [-h | --help]"
  echo >&2
  echo >&2 "Supported oggz-dump and diff options:"
  echo >&2
  echo >&2 "OGGZDUMP_OPTIONS: [-b | --binary] [-x | --hexadecimal]"
  echo >&2 "    [-O | --hide-offset] [-S | --hide-serialno] [-G | --hide-granulepos]"
  echo >&2 "    [-P | --hide-packetno] [-s serialno | --serialno serialno]"
  echo >&2 "    [-c content-type | --content-type content-type]"
  echo >&2
  echo >&2 "DIFF_OPTIONS: [-q | --brief] [-C NUM | --context[=NUM]]"
  echo >&2 "     [-u | -U NUM | --unified[=NUM]] [-e | -ed] [--normal] [--rcs]"
  echo >&2 "     [-y | --side-by-side] [-l | --paginate]"
  echo >&2
  exit 1
}

GETOPTEST=`getopt --version`
case $GETOPTEST in
getopt*) # GNU getopt
  GETOPTARGS="-l verbose -l version -l brief -l context:: -l unified:: -l ed -l normal -l rcs -l side-by-side -l paginate -l binary -l hexadecimal -l serialno: -l content-type: -l hide-offset -l hide-serialno -l hide-granulepos -l hide-packetno -l help -- +qC:uU:eylbxs:c:OSGPhv"
  QARGS="--verbose --version --brief --context --unified --ed --normal --rcs --side-by-side --paginate --binary --hexadecimal --serialno --content-type --hide-offset --hide-serialno --hide-granulepos --hide-packetno --help -q -C -u -U -e -y -l -b -x -s -c -O -S -G -P -h -v"
  ;;
*) # POSIX getopt ?
  GETOPTARGS="qC:uU:eylbxs:c:OSGPhv"
  QARGS="-q -C -u -U -e -y -l -b -x -s -c -O -S -G -P -h -v"
  ;;
esac

# First check for -? option
if test "X$1" = "X-?"; then
  exit 0
fi

TEMP=`getopt $GETOPTARGS "$@"`

if test "$?" != "0"; then
  usage
fi

eval set -- "$TEMP"

DIFFOPTS="-w" # -w, --ignore-all-space
DUMPOPTS=""
VERBOSE=""

while test "X$1" != "X--"; do
  case "$1" in
    -q|--brief)
      DIFFOPTS=$DIFFOPTS" -q"
      ;;
    -C)
      shift
      DIFFOPTS=$DIFFOPTS" -C $1"
      ;;
    --context)
      shift
      if test "x$1" = "x"; then
        DIFFOPTS=$DIFFOPTS" --context"
      else
        DIFFOPTS=$DIFFOPTS" --context=$1"
      fi
      ;;
    -u)
      DIFFOPTS=$DIFFOPTS" -u"
      ;;
    -U)
      shift
      DIFFOPTS=$DIFFOPTS" -U $1"
      ;;
    --unified)
      shift
      if test "x$1" = "x"; then
        DIFFOPTS=$DIFFOPTS" --unified"
      else
        DIFFOPTS=$DIFFOPTS" --unified=$1"
      fi
      ;;
    -e|--ed)
      DIFFOPTS=$DIFFOPTS" -e"
      ;;
    --normal)
      DIFFOPTS=$DIFFOPTS" --normal"
      ;;
    --rcs)
      DIFFOPTS=$DIFFOPTS" --rcs"
      ;;
    -y|--side-by-side)
      DIFFOPTS=$DIFFOPTS" -y"
      ;;
    -l|--paginate)
      DIFFOPTS=$DIFFOPTS" -l"
      ;;
    -b|--binary)
      DUMPOPTS=$DUMPOPTS" -b"
      ;;
    -x|--hexadecimal)
      DUMPOPTS=$DUMPOPTS" -x"
      ;;
    -s|--serialno)
      shift
      DUMPOPTS=$DUMPOPTS" -s $1"
      ;;
    -c)
      shift
      DUMPOPTS=$DUMPOPTS" -c $1"
      ;;
    -O|--hide-offset)
      DUMPOPTS=$DUMPOPTS" -O"
      ;;
    -S|--hide-serialno)
      DUMPOPTS=$DUMPOPTS" -S"
      ;;
    -G|--hide-granulepos)
      DUMPOPTS=$DUMPOPTS" -G"
      ;;
    -P|--hide-packetno)
      DUMPOPTS=$DUMPOPTS" -P"
      ;;
    --verbose)
      VERBOSE="y"
      ;;
    -v|--version)
      version
      ;;
    -h|--help)
      usage
      ;;
  esac
  shift
done

# Check that all options parsed ok
if test "x$1" != "x--"; then
  usage
fi
shift #get rid of the '--'

if test "x$1" = "x"; then
  usage
fi
if test "x$2" = "x"; then
  usage
fi

if test "x$VERBOSE" != "x"; then
  echo >&2 "OGGZDUMP_OPTIONS: " $DUMPOPTS
  echo >&2 "DIFF_OPTIONS: " $DIFFOPTS
fi

FIFO1="${TMPDIR:-/tmp}/`basename $1`.dump-1-$$"
FIFO2="${TMPDIR:-/tmp}/`basename $2`.dump-2-$$"

exec 5>$FIFO1
exec 6>$FIFO2

oggz-dump $DUMPOPTS $1 >&5
if test "$?" != "0"; then
  exit 1
fi

oggz-dump $DUMPOPTS $2 >&6
if test "$?" != "0"; then
  exit 1
fi

diff $DIFFOPTS $FIFO1 $FIFO2
ret=$?

rm $FIFO1 $FIFO2

exit $ret