Overrun fixes.

This commit is contained in:
Jeffrey Townsend
2019-07-30 14:14:19 -07:00
parent b9afeb1bc0
commit 616b4f448d

View File

@@ -26,6 +26,7 @@
#include <onlp/platformi/fani.h>
#include <unistd.h>
#include <fcntl.h>
#include <limits.h>
#include "platform_lib.h"
#include "arm_accton_as4610_int.h"
@@ -123,7 +124,7 @@ _onlp_fani_info_get_fan(int local_id, onlp_fan_info_t* info)
{
int fd, len, nbytes = 10;
char r_data[10] = {0};
char fullpath[65] = {0};
char fullpath[PATH_MAX] = {0};
/* get fan fault status (turn on when any one fails)
*/
@@ -152,7 +153,7 @@ _onlp_fani_info_get_fan_on_psu(int local_id, onlp_fan_info_t* info)
int psu_id;
int fd, len, nbytes = 10;
char r_data[10] = {0};
char fullpath[80] = {0};
char fullpath[PATH_MAX] = {0};
psu_type_t psu_type;
/* get fan fault status
@@ -263,7 +264,7 @@ onlp_fani_percentage_set(onlp_oid_t id, int p)
{
int fd, len, nbytes=10, local_id;
char data[10] = {0};
char fullpath[70] = {0};
char fullpath[PATH_MAX] = {0};
VALIDATE(id);
@@ -347,4 +348,3 @@ onlp_fani_ioctl(onlp_oid_t id, va_list vargs)
{
return ONLP_STATUS_E_UNSUPPORTED;
}