[libdvbpsi-devel] [PATCH] dr_50: fix off-by-6

Jean-Paul Saman jpsaman at videolan.org
Mon Sep 8 14:41:19 CEST 2014


On Fri, Sep 5, 2014 at 12:11 PM, Rafaël Carré <funman at videolan.org> wrote:

> ---
>  src/descriptors/dr_50.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/descriptors/dr_50.c b/src/descriptors/dr_50.c
> index a2e491c..9933b08 100644
> --- a/src/descriptors/dr_50.c
> +++ b/src/descriptors/dr_50.c
> @@ -70,7 +70,7 @@ dvbpsi_component_dr_t*
> dvbpsi_DecodeComponentDr(dvbpsi_descriptor_t * p_descript
>      if (p_descriptor->i_length > 6)
>      {
>         p_decoded->i_text_length = p_descriptor->i_length - 6;
> -       p_decoded->i_text = calloc(p_decoded->i_text_length - 6,
> sizeof(uint8_t));
> +        p_decoded->i_text = calloc(1, p_decoded->i_text_length);
>          if (!p_decoded->i_text)
>          {
>                 free(p_decoded);
> --
> 2.1.0
>
> _______________________________________________
> libdvbpsi-devel mailing list
> libdvbpsi-devel at videolan.org
> https://mailman.videolan.org/listinfo/libdvbpsi-devel
>

Patch merged in http://git.m2x.eu/videolan/libdvbpsi.git,
it will show up in git.videolan.org/libdvbpsi.git later on.


Kind regards,
Jean-Paul Saman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/libdvbpsi-devel/attachments/20140908/71cf3a55/attachment.html>


More information about the libdvbpsi-devel mailing list