Static analyzer bug fixes
[silc.git] / lib / silcasn1 / silcasn1_decode.c
index 21c39f8cbf06335a4db2695b20c4bc560df7b25d..8e9776617224a714cd22746018e46beae5c92893 100644 (file)
@@ -230,7 +230,7 @@ static SilcBool silc_asn1_decoder_sof(SilcAsn1 asn1, SilcBuffer src)
     ret = FALSE;                                               \
     goto fail;                                                 \
   }                                                            \
-  *s = silc_smalloc_ua(stack1, *s_len + 1);                    \
+  *s = silc_smalloc(stack1, *s_len + 1);                       \
   if (*s) {                                                    \
     silc_utf8_encode(rdata, rdata_len, (enc), *s, *s_len);     \
     (*s)[*s_len] = '\0';                                       \
@@ -408,7 +408,7 @@ silc_asn1_decoder(SilcAsn1 asn1, SilcStack stack1, SilcAsn1Tag type,
       }
 
       /* Decode by the type user expects the data to be. */
-      switch (type) {
+      switch ((long)type) {
 
       case SILC_ASN1_TAG_ANY:
        {