From: tomo Date: Fri, 3 Oct 2003 11:45:49 +0000 (+0000) Subject: (chise_ccs_decode): Return -1 when argument `ccs' is NULL. X-Git-Tag: b1-r0_2_0-pre7~10 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=51b2d2caeb46f18f2a6f03f666230d3211951586;p=chise%2Flibchise.git (chise_ccs_decode): Return -1 when argument `ccs' is NULL. (chise_ccs_set_decoded_char): Likewise. --- diff --git a/chise.c b/chise.c index 43c60e7..b5ede8a 100644 --- a/chise.c +++ b/chise.c @@ -127,7 +127,7 @@ chise_ds_get_feature (CHISE_DS *ds, const unsigned char *feature) return ft; } -CHISE_CCS_Table* +CHISE_CCS chise_ds_get_ccs (CHISE_DS *ds, const unsigned char *ccs) { CHISE_CCS_Table* ct; @@ -391,6 +391,9 @@ chise_ccs_decode (CHISE_CCS ccs, int code_point) int status = 0; char key_buf[16]; + if (ccs == NULL) + return -1; + if (ccs->db == NULL) { CHISE_DS *ds = ccs->ds; @@ -423,6 +426,9 @@ chise_ccs_set_decoded_char (CHISE_CCS ccs, { char key_buf[16], val_buf[8]; + if (ccs == NULL) + return -1; + if ((ccs->access & DB_CREATE) == 0) { if (ccs->db != NULL)