~ubuntu-branches/ubuntu/raring/flac/raring

« back to all changes in this revision

Viewing changes to src/share/utf8/charset.c

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-12-06 16:57:20 UTC
  • mto: (8.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20071206165720-4przr8grn6ha3e3a
Tags: upstream-1.2.1
ImportĀ upstreamĀ versionĀ 1.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
#include <stdlib.h>
37
37
 
 
38
#include "share/alloc.h"
38
39
#include "charset.h"
39
40
 
40
41
#include "charmaps.h"
492
493
  if (!charset1 || !charset2 )
493
494
    return -1;
494
495
 
495
 
  tobuf = (char *)malloc(fromlen * charset2->max + 1);
 
496
  tobuf = (char *)safe_malloc_mul2add_(fromlen, /*times*/charset2->max, /*+*/1);
496
497
  if (!tobuf)
497
498
    return -2;
498
499