From one page I found when searching:
If
Length
contains the value 0, then this CIE shall be considered a terminator and processing shall end.
So I think your changes are correct here. In general I would think any time there is a length field in any file format, 0 should probably always be considered a valid value.