Commit Graph

8 Commits

Author SHA1 Message Date
Vadim Yanitskiy 664a866d59 fmt_ti.c: fix: properly pre-clean the output buffer
Despite it was stated that only the last nibble isn't being
written, some other bytes in the middle of the output buffer
were uninitialized during the first exectution of a queue.

The problem was observed with AddressSanitizer enabled.

Valgrind output:

  $ valgrind --track-origins=yes \
      src/.libs/lt-osmo-gapk \
      -i tests/ref-files/hhgttg_part1_5.s16.ti-efr \
      -f ti-efr -g rawpcm-s16le \
      -o /dev/null -v

 Conditional jump or move depends on uninitialised value(s)
    at 0x52728F2: msb_put_bit (utils.h:39)
    by 0x52728F2: amr_efr_from_canon (fmt_amr.c:45)
    by 0x5270A7D: osmo_gapk_pq_execute (procqueue.c:202)
    by 0x40296A: run (app_osmo_gapk.c:650)
    by 0x40296A: main (app_osmo_gapk.c:778)
  Uninitialised value was created by a heap allocation
    at 0x4C2AB80: malloc (in vgpreload_memcheck-amd64-linux.so)
    by 0x4E3C2A8: talloc_named_const (in libtalloc.so.2.1.5)
    by 0x5270A1B: osmo_gapk_pq_prepare (procqueue.c:180)
    by 0x402940: run (app_osmo_gapk.c:645)
    by 0x402940: main (app_osmo_gapk.c:778)

Change-Id: I79df56dde23702b0eac8e8fdbc0efd270cc0ace4
Related: OS#2934
2018-07-03 15:29:32 +00:00
Vadim Yanitskiy a8d46571ce Add an 'osmo_gapk' prefix to the exposed symbols
To avoid a naming conflict between libosmogapk and other projects
during linkage, all the exposed symbols should have an unique
prefix. Let's use 'osmo_gapk' for that.
2017-12-31 12:20:59 +01:00
Vadim Yanitskiy 30209ceddd Install GAPK headers to '${includedir}/osmocom/gapk/'
To be able to use the library, external applications need to know,
which symbols are exposed. This information is provided by header
files, which are being installed to a system's ${includedir}
since this change.
2017-12-31 12:20:59 +01:00
Harald Welte 7bdf34cc09 fmt_ti: fix lsb/msb mix-up in ti_hr_from_canon()
I noticed that ti-hr format doesn't pass an encode-decode-playback test,
and discussion with tnt resulted in the following conclusion:

19:29 <@tnt> looking at fr and efr, it's always msb_xxx
19:30 <@tnt> and if I ever used it, then most likely it was for decoding
             meaning ti_hr_to_canon would have been used and not the
             other way around.
2017-05-28 19:33:05 +02:00
Harald Welte 5912848d2e prepare gapk for dealing with variable-length frames
The existing architecture was modelled around fixed-length codec frame
sizes, which of course fails with multi-rate codecs such as AMR.
2017-05-28 10:44:06 +02:00
Sylvain Munaut e2c5719d74 format/fmt_ti: Add support for EFR variant
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-02-25 18:12:25 +01:00
Sylvain Munaut b1525d67fe format/fmt_ti: Add support for HR variant
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-02-25 16:58:36 +01:00
Sylvain Munaut cfaec3a2f6 format: Add support for the TI calypso/locosto dumped buffer format
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-02-25 15:31:54 +01:00