Read buffer to set_contents_from_string

Same need to be applied to line 121. Github don't allow commenting on that line, So commenting here.