Lines Matching refs:new_buf
94 unsigned char *new_buf = NULL; in ota_nbpatch() local
152 new_buf = malloc(new_size); in ota_nbpatch()
153 if (new_buf == NULL) { in ota_nbpatch()
206 read_len = xz_read(&diffhandler, &db, diff_dec, patch, new_buf + new_pos, ctrl[0]); in ota_nbpatch()
233 new_buf[new_pos + i] += old_buf[i - base_pos]; in ota_nbpatch()
236 crc16_update(&crc_ctx, new_buf + new_pos, ctrl[0]); in ota_nbpatch()
246 read_len = xz_read(&extrahandler, &eb, extra_dec, patch, new_buf + new_pos, ctrl[1]); in ota_nbpatch()
251 crc16_update(&crc_ctx, new_buf + new_pos, ctrl[1]); in ota_nbpatch()
257 cal_crc = crc16_computer(new_buf, new_size); in ota_nbpatch()
263 ret = ota_patch_new_data(new_buf, new_size); in ota_nbpatch()
292 if(new_buf){ in ota_nbpatch()
293 free(new_buf); in ota_nbpatch()
294 new_buf = NULL; in ota_nbpatch()