Language: Python
Label: safe
CWE: CWE-476 \u2014 NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.

Code:
  def testParallelConcatFailsWithRankZeroShape(self):
    op = array_ops.ParallelConcat
    para = {"shape": 0, "values": [1]}

    def func():
      y = op(**para)
      return y

    with self.assertRaisesRegex(
        Exception, "(rank|dimension) of .* must be greater than .* 0"
    ):
      func()