read() and write() do not behave as documented
- Dominant language
- C++
- Stars
- 39
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
read() and write() do not behave as documented in ATParser.h.
/**
* Write an array of bytes to the underlying stream
*
* @param data the array of bytes to write
* @param size number of bytes to write
* @return number of bytes written or -1 on failure
*/
int write(const char *data, int size);
/**
* Read an array of bytes from the underlying stream
*
* @param data the destination for the read bytes
* @param size number of bytes to read
* @return number of bytes read or -1 on failure
*/
int read(char *data, int size);
Existing implementation will error out if bytes read/written do not exactly match size parameter.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the read() and write() implementations corresponding to the declarations in ATParser.h. Compare their handling of partial stream operations with the documented return values; done means operations that transfer fewer bytes than requested are handled according to the documented count-or--1 contract rather than treated as errors solely because the count differs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100