… | |
… | |
312 | psiconv_error(config,lev+2,off+len+i,"Malformed text section"); |
312 | psiconv_error(config,lev+2,off+len+i,"Malformed text section"); |
313 | res = PSICONV_E_PARSE; |
313 | res = PSICONV_E_PARSE; |
314 | goto ERROR4; |
314 | goto ERROR4; |
315 | } |
315 | } |
316 | if ((temp == 0x06) || (i + leng == text_len)) { |
316 | if ((temp == 0x06) || (i + leng == text_len)) { |
317 | if (!(para->text = malloc(sizeof(*(para->text)) * |
317 | if (!(para->text = psiconv_unicode_from_list(line))) |
318 | (psiconv_list_length(line) + 1)))) |
|
|
319 | goto ERROR4; |
318 | goto ERROR4; |
320 | for (j = 0; j < psiconv_list_length(line); j++) { |
|
|
321 | if (!(nextcharptr = psiconv_list_get(line,j))) { |
|
|
322 | psiconv_error(config,lev+2,off+i+len,"Data structure corruption"); |
|
|
323 | goto ERROR5; |
|
|
324 | } |
|
|
325 | para->text[j] = *nextcharptr; |
|
|
326 | } |
|
|
327 | para->text[j] = 0; |
|
|
328 | |
319 | |
329 | if (!(str_copy = psiconv_make_printable(config,para->text))) |
320 | if (!(str_copy = psiconv_make_printable(config,para->text))) |
330 | goto ERROR5; |
321 | goto ERROR5; |
331 | psiconv_debug(config,lev+2,off+i+len,"Line %d: %d characters",nr, |
322 | psiconv_debug(config,lev+2,off+i+len,"Line %d: %d characters",nr, |
332 | strlen(str_copy) +1); |
323 | strlen(str_copy) +1); |