You need to find out if the data in the database is wrong, or if your application has a problem.
I would start with checking the length of the bytea column in the old and the new database:
Code:
SELECT length(your_bytea_column)
FROM your_table
If those are identical, then chances are it's your application.
In that case it might be an outdated driver you are using.
In 9.0 the encoding for binary data has changed. If you are using an old driver, this will affect the way binary data is received in your application.
http://www.postgresql.org/docs/9.0/static/release-9-0.html#AEN99329