Misc plus fix for #373

This commit is contained in:
joan2937 2020-08-17 08:31:26 +01:00
parent 9a22f2d64b
commit 93965f8e3b
3 changed files with 5 additions and 2 deletions

View File

@ -1572,6 +1572,9 @@ int myPathBad(char *name)
in_part = 0; in_part = 0;
last_char_dot = 0; last_char_dot = 0;
if (strstr(name, "..")) return 1;
if (strstr(name, "\\.")) return 1;
len = strlen(name); len = strlen(name);
for (i=0; i<len; i++) for (i=0; i<len; i++)

View File

@ -1064,7 +1064,7 @@ int i2c_process_call(unsigned handle, unsigned reg, uint32_t val)
ext[0].ptr = &val; ext[0].ptr = &val;
return pigpio_command_ext return pigpio_command_ext
(gPigCommand, PI_CMD_I2CPK, handle, reg, 4, 1, ext, 1); (gPigCommand, PI_CMD_I2CPC, handle, reg, 4, 1, ext, 1);
} }
int i2c_write_block_data( int i2c_write_block_data(

View File

@ -1288,7 +1288,7 @@ int i2c_process_call(int pi, unsigned handle, unsigned reg, uint32_t val)
ext[0].ptr = &val; ext[0].ptr = &val;
return pigpio_command_ext return pigpio_command_ext
(pi, PI_CMD_I2CPK, handle, reg, 4, 1, ext, 1); (pi, PI_CMD_I2CPC, handle, reg, 4, 1, ext, 1);
} }
int i2c_write_block_data( int i2c_write_block_data(