am 0c0f68e8: Fix a long standing  bug in the output buffer size computation.

Merge commit '0c0f68e8ff9fb88eaae614d1da316f0037484886' into gingerbread-plus-aosp

* commit '0c0f68e8ff9fb88eaae614d1da316f0037484886':
  Fix a long standing  bug in the output buffer size computation.