#1859 ding-libs.path_utils: use '\0' in checks for null terminator
Closed: Fixed Opened by okos.

The checks for null terminator should be against '\0', not it's decimal value.

path_utils/path_utils.c:

120    if (tmp_path[sizeof(tmp_path)-1] != 0) return ENOBUFS;
122    if (base_name[base_name_size-1] != 0) return ENOBUFS;
141    if (tmp_path[sizeof(tmp_path)-1] != 0) return ENOBUFS;
143    if (dir_path[dir_path_size-1] != 0) return ENOBUFS;
165    if (tmp_path[sizeof(tmp_path)-1] != 0) return ENOBUFS;
167    if (base_name[base_name_size-1] != 0) return ENOBUFS;
170    if (tmp_path[sizeof(tmp_path)-1] != 0) return ENOBUFS;
172    if (dir_path[dir_path_size-1] != 0) return ENOBUFS;
532    if (dir_path[sizeof(dir_path)-1] != 0) return ENOBUFS;

Fields changed

patch: 0 => 1

Fields changed

milestone: NEEDS_TRIAGE => Tools 1.0.1

Fields changed

rhbz: => 0

Fields changed

owner: somebody => okos

resolution: => fixed
status: new => closed
_comment0: * master: 3d3056b38061386a49ca793e08ce52e8c5562f46 => 1365609560371576

Metadata Update from @okos:
- Issue assigned to okos
- Issue set to the milestone: Tools 1.0.1

Metadata