Skip to content

Commit

Permalink
Misc plus fix for #373
Browse files Browse the repository at this point in the history
  • Loading branch information
joan2937 committed Aug 17, 2020
1 parent 9a22f2d commit 93965f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pigpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1572,6 +1572,9 @@ int myPathBad(char *name)
in_part = 0;
last_char_dot = 0;

if (strstr(name, "..")) return 1;
if (strstr(name, "\\.")) return 1;

len = strlen(name);

for (i=0; i<len; i++)
Expand Down
2 changes: 1 addition & 1 deletion pigpiod_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ int i2c_process_call(unsigned handle, unsigned reg, uint32_t val)
ext[0].ptr = &val;

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(
Expand Down
2 changes: 1 addition & 1 deletion pigpiod_if2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ int i2c_process_call(int pi, unsigned handle, unsigned reg, uint32_t val)
ext[0].ptr = &val;

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(
Expand Down

0 comments on commit 93965f8

Please sign in to comment.