[FFmpeg-devel] [PATCH 6/6] avutil/des: use EINVAL instead of -1 for the return code of av_des_init()

Ganesh Ajjanagadde gajjanagadde at gmail.com
Sun Oct 18 21:23:23 CEST 2015


On Sat, Oct 17, 2015 at 7:52 PM, Ganesh Ajjanagadde
<gajjanagadde at gmail.com> wrote:
> On Sat, Oct 17, 2015 at 7:49 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
>> Hi,
>>
>> On Sat, Oct 17, 2015 at 7:40 PM, Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> wrote:
>>>
>>> On Sat, Oct 17, 2015 at 7:39 PM, Ganesh Ajjanagadde
>>> <gajjanagadde at gmail.com> wrote:
>>> > Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>>> > ---
>>> >  libavutil/des.c | 2 +-
>>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>>> >
>>> > diff --git a/libavutil/des.c b/libavutil/des.c
>>> > index c97158a..3ccbf89 100644
>>> > --- a/libavutil/des.c
>>> > +++ b/libavutil/des.c
>>> > @@ -292,7 +292,7 @@ AVDES *av_des_alloc(void)
>>> >
>>> >  int av_des_init(AVDES *d, const uint8_t *key, int key_bits, av_unused
>>> > int decrypt) {
>>> >      if (key_bits != 64 && key_bits != 192)
>>> > -        return -1;
>>> > +        return AVERROR(EINVAL);
>>> >      d->triple_des = key_bits > 64;
>>> >      gen_roundkeys(d->round_keys[0], AV_RB64(key));
>>> >      if (d->triple_des) {
>>> > --
>>> > 2.6.1
>>> >
>>>
>>> I can squash these if people prefer, or leave as is.
>>
>>
>> Whichever you prefer. All patches in this set LGTM.
>
> I think I have missed a few crypto things. Will add them, send out the
> patches (to get at least another eye on them), and once ok'ed, squash
> and push.

pushed

>
>>
>> Ronald


More information about the ffmpeg-devel mailing list