hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject hbase git commit: HBASE-14048 isPBMagicPrefix should always check for null data
Date Thu, 16 Jul 2015 17:05:05 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 9a7df6936 -> e6f9dc0fe


HBASE-14048 isPBMagicPrefix should always check for null data


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e6f9dc0f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e6f9dc0f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e6f9dc0f

Branch: refs/heads/0.98
Commit: e6f9dc0fec652b06e20de4ea32325583c18e2511
Parents: 9a7df69
Author: Andrew Purtell <apurtell@apache.org>
Authored: Thu Jul 16 10:04:25 2015 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Thu Jul 16 10:04:25 2015 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java    | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/e6f9dc0f/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
index 3d596ef..9b25ba3 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
@@ -240,6 +240,7 @@ public final class ProtobufUtil {
    * @return True if passed <code>bytes</code> has {@link #PB_MAGIC} for a prefix.
    */
   public static boolean isPBMagicPrefix(final byte [] bytes) {
+    if (bytes == null) return false;
     return isPBMagicPrefix(bytes, 0, bytes.length);
   }
 


Mime
View raw message