SetContents() should only be called to set the contents of an entry from
within the ObtainContents() call, since it has no guard against increasing
the size of the contents, thus triggering incorrect operation.
Change all such calls to use ProcessUpdateContents() instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
def ProcessContents(self):
"""Re-read the DTB contents so that we get any calculated properties"""
_, data = state.GetFdtContents(self._filename)
- self.SetContents(data)
+ self.ProcessContentsUpdate(data)
This is necessary since new data may have been written back to it during
processing, e.g. the image-pos properties.
"""
- self.SetContents(self._GetFdtmap())
+ self.ProcessContentsUpdate(self._GetFdtmap())
return True
def ProcessContents(self):
- self.SetContents(self._GetFmap())
+ self.ProcessContentsUpdate(self._GetFmap())
This is necessary since image_pos is not available when ObtainContents()
is called, since by then the entries have not been packed in the image.
"""
- self.SetContents(self._GetHeader())
+ self.ProcessContentsUpdate(self._GetHeader())