hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Palamuttam (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-8090) Potential null pointer reference in WriterImpl#StreamFactory#createStream()
Date Sun, 14 Sep 2014 08:58:33 GMT

     [ https://issues.apache.org/jira/browse/HIVE-8090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rahul Palamuttam updated HIVE-8090:
-----------------------------------
    Attachment: HIVE-8090.1.patch

A new boolean variable is introduced which checks if the codec is null or of type ZlibCodec.
This is substituted in place of the evaluated expression for the boolean operator. Anymore
conditionals for this to this parameter should be updated to the new boolean variable.

> Potential null pointer reference in WriterImpl#StreamFactory#createStream()
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-8090
>                 URL: https://issues.apache.org/jira/browse/HIVE-8090
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Ted Yu
>         Attachments: HIVE-8090.1.patch
>
>
> {code}
>       switch (kind) {
> ...
>       default:
>         modifiers = null;
>         break;
>       }
>       BufferedStream result = streams.get(name);
>       if (result == null) {
>         result = new BufferedStream(name.toString(), bufferSize,
>             codec == null ? codec : codec.modify(modifiers));
> {code}
> In case modifiers is null and codec is ZlibCodec, there would be NPE in ZlibCodec#modify(EnumSet<Modifier>
modifiers) :
> {code}
>     for (Modifier m : modifiers) {
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message