summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xheynoti.c6
-rw-r--r--packaging/heynoti.spec3
2 files changed, 7 insertions, 2 deletions
diff --git a/heynoti.c b/heynoti.c
index 2d4b8cc..aed59d3 100755
--- a/heynoti.c
+++ b/heynoti.c
@@ -266,10 +266,12 @@ static int __handle_event(int fd)
return -1;
if (ie.len > 0u) {
- read(fd, name, (ie.len > FILENAME_MAX) ? (size_t)FILENAME_MAX : (size_t) ie.len);
+ r = read(fd, name, (ie.len > FILENAME_MAX) ? (size_t)FILENAME_MAX : (size_t) ie.len);
}
- r = read(fd, &ie, sizeof(ie));
+ if(r > 0) {
+ r = read(fd, &ie, sizeof(ie));
+ }
}
return 0;
diff --git a/packaging/heynoti.spec b/packaging/heynoti.spec
index a3a2ceb..d9135ee 100644
--- a/packaging/heynoti.spec
+++ b/packaging/heynoti.spec
@@ -43,6 +43,8 @@ make %{?_smp_mflags}
%make_install
mkdir -p %{buildroot}%{TZ_SYS_SHARE}/noti
+mkdir -p %{buildroot}/usr/share/license
+install LICENSE %{buildroot}/usr/share/license/%{name}
%post -p /sbin/ldconfig
@@ -56,6 +58,7 @@ mkdir -p %{buildroot}%{TZ_SYS_SHARE}/noti
%{_libdir}/libheynoti.so.0.0.2
%{_bindir}/heynotitool
%attr(1755,root,root) %{TZ_SYS_SHARE}/noti
+/usr/share/license/%{name}
%files devel