Fix accessing freed memory in X509CertificateStore::Update()
[platform/framework/native/appfw.git] / inc / FBaseInt8.h
index eb6f65e..30cfdfe 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -28,7 +27,6 @@
 
 #include <FBaseNumber.h>
 
-
 namespace Tizen { namespace Base
 {
 /**
@@ -85,7 +83,6 @@ public:
         */
        Int8(char value = 0);
 
-
        /**
         * Copying of objects using this copy constructor is allowed.
         *
@@ -171,8 +168,8 @@ public:
        *
        *   @since 2.0
        *
-       *   @return     An integer value indicating the hash value of the specified @c char value
-       *   @param[in]   val   A @c char value to get the hash value
+       *   @return             An integer value indicating the hash value of the specified @c char value
+       *   @param[in]  val   A @c char value to get the hash value
        */
        static int GetHashCode(char val);
 
@@ -198,6 +195,13 @@ public:
         *      - Sign:
         *              '-'
         * @endcode
+        * @remarks             This method has portability issue. @n
+        *                              When the specified string is nagative number in the ARM architecture, type casting is needed like following code.
+        * @code
+        *      char ret;
+        *      Int8::Decode(L"-0X20", ret);
+        *      SomeOutputFunction(static_cast< signed char >(ret));
+        * @endcode
         */
        static result Decode(const String& s, char& ret);
 
@@ -211,25 +215,27 @@ public:
         * @param[out]  ret     The result of the operation
         * @exception   E_SUCCESS        The method is successful.
         * @exception   E_NUM_FORMAT The specified string does not contain a byte that can be parsed.
-        * @remarks             This method assumes that the string representing the numeric value
-        *                              uses a radix 10.
+        * @remarks
+        *                              - This method assumes that the string representing the numeric value uses a radix 10.
+        *                              - This method guarantees that the original value of out-parameter is not changed when the method returns error.
         */
        static result Parse(const String& s, char& ret);
 
        /**
         * Parses the specified string representing a numeric value and
-     * returns the value as @c signed @c char (as out parameter).
-     *
+        * returns the value as @c signed @c char (as out parameter).
+        *
         * @since 2.0
         *
         * @return              The @c signed @c char equivalent of the specified string representing the numeric value using the specified index
         * @param[in]   s       A string representing a numeric value
         * @param[in]   radix   The radix of the string representing a numeric value @n
         *                                              It must either be 2, 8, 10, or 16.
-     * @param[out]     ret             The result of the operation
+        * @param[out]  ret             The result of the operation
         * @exception   E_SUCCESS        The method is successful.
         * @exception   E_NUM_FORMAT The specified string does not contain a number that can be parsed.
         * @exception   E_OUT_OF_RANGE The specified @c radix is invalid.
+        * @remarks             This method guarantees that the original value of out-parameter is not changed when the method returns error.
         */
        static result Parse(const String& s, int radix, char& ret);
 
@@ -341,7 +347,7 @@ public:
 
 private:
        friend class _Int8Impl;
-       class _Int8Impl * __pInt8Impl;
+       class _Int8Impl* __pInt8Impl;
 
 }; // Int8