This might be exploitable in some cases. There has been a "heated" discussion in 2014 about off-by-one NUL byte heap overflow that lead to this blogpost from projectzero:
https://googleprojectzero.blogspot.com/2014/08/the-poisoned-...
There have been other examples where only a 1 could be written.