size_t count, loff_t *ppos)
 {
        int action = 0xffff, busNo = 0, i, result = 0;
-       char buf[count];
+       char buf[4];
        char direction;
 /* GUID guid; */
+       if (count >= ARRAY_SIZE(buf))
+               return -EINVAL;
+
        if (copy_from_user(buf, buffer, count)) {
                LOGERR("echo > /proc/uislib/vnic copy_from_user ****FAILED.\n");
                return -EFAULT;
                   size_t count, loff_t *ppos)
 {
        int i, action = 0xffff;
-       char buf[count];
+       char buf[4];
        CONTROLVM_MESSAGE msg;
 
+       if (count >= ARRAY_SIZE(buf))
+               return -EINVAL;
+
        memset(&msg, 0, sizeof(CONTROLVM_MESSAGE));
 
        if (copy_from_user(buf, buffer, count)) {
 {
        int server_flag = 0;
        int i, action = 0xffff, result;
-       char buf[count];
+       char buf[16];
        CONTROLVM_MESSAGE msg;
        U32 busNo, deviceCount;
 
+       if (count >= ARRAY_SIZE(buf))
+               return -EINVAL;
+
        memset(&msg, 0, sizeof(CONTROLVM_MESSAGE));
 
        if (copy_from_user(buf, buffer, count)) {
        int server_flag = 0;
        CONTROLVM_MESSAGE msg;
        U32 busNo, devNo;
-       char buf[count];
+       char buf[32];
        unsigned int chanptr;
        int type, i, action = 0xffff, result;
 
+       if (count >= ARRAY_SIZE(buf))
+               return -EINVAL;
+
        if (copy_from_user(buf, buffer, count)) {
                LOGERR("echo > /proc/uislib/device: copy_from_user ****FAILED.");
                return -EFAULT;
 cycles_before_wait_proc_write(struct file *file, const char __user *buffer,
                              size_t count, loff_t *ppos)
 {
-       char buf[count];
+       char buf[16];
 
 #define CYCLES_BEFORE_WAIT_USE_ERROR  { \
        LOGERR("Incorrect Call Home Input.\n"); \
        pr_info("EventID Category Type[parameter1][parameter2][parameter3][parameter4][parameter5][parameter6]\n"); \
        return -EFAULT; \
 }
+       if (count >= ARRAY_SIZE(buf))
+               return -EINVAL;
 
        if (count == 0)
                CYCLES_BEFORE_WAIT_USE_ERROR;
 reset_counts_proc_write(struct file *file, const char __user *buffer,
                        size_t count, loff_t *ppos)
 {
-       char buf[count];
+       char buf[16];
        unsigned long long new_value;
        struct bus_info *bus;
        int i;
        return -EFAULT; \
        }
 
+       if (count >= ARRAY_SIZE(buf))
+               return -EINVAL;
+
        if (count == 0)
                RESET_COUNTS_USE_ERROR;
 
 smart_wakeup_proc_write(struct file *file, const char __user *buffer,
                        size_t count, loff_t *ppos)
 {
-       char buf[count];
+       char buf[16];
        int new_value;
 
 #define SMART_WAKEUP_USE_ERROR  { \
        return -EFAULT; \
        }
 
+       if (count >= ARRAY_SIZE(buf))
+               return -EINVAL;
+
        if (count == 0)
                SMART_WAKEUP_USE_ERROR;
 
                size_t count, loff_t *ppos)
 {
        int i, action = 0xffff;
-       char buf[count];
+       char buf[16];
        CONTROLVM_MESSAGE msg;
        S64 vrtc_offset;
 
+       if (count >= ARRAY_SIZE(buf))
+               return -EINVAL;
+
        memset(&msg, 0, sizeof(CONTROLVM_MESSAGE));
 
        if (copy_from_user(buf, buffer, count)) {