Merge "Fix a couple of OOB read bugs found by the fuzzer." into udc-dev