diff --git a/src/gpioplus/event.cpp b/src/gpioplus/event.cpp
index d7e3716..88c5c47 100644
--- a/src/gpioplus/event.cpp
+++ b/src/gpioplus/event.cpp
@@ -25,14 +25,18 @@
 
 static int build(const Chip& chip, uint32_t line_offset,
                  HandleFlags handle_flags, EventFlags event_flags,
-                 const char* consumer_label)
+                 std::string_view consumer_label)
 {
     struct gpioevent_request req;
     memset(&req, 0, sizeof(req));
     req.lineoffset = line_offset;
     req.handleflags = handle_flags.toInt();
     req.eventflags = event_flags.toInt();
-    strncpy(req.consumer_label, consumer_label, sizeof(req.consumer_label) - 1);
+    if (consumer_label.size() >= sizeof(req.consumer_label))
+    {
+        throw std::invalid_argument("consumer_label");
+    }
+    memcpy(req.consumer_label, consumer_label.data(), consumer_label.size());
 
     int r = chip.getFd().getSys()->gpio_get_lineevent(*chip.getFd(), &req);
     if (r < 0)
@@ -45,7 +49,7 @@
 }
 
 Event::Event(const Chip& chip, uint32_t line_offset, HandleFlags handle_flags,
-             EventFlags event_flags, const char* consumer_label) :
+             EventFlags event_flags, std::string_view consumer_label) :
     fd(build(chip, line_offset, handle_flags, event_flags, consumer_label),
        std::false_type(), chip.getFd().getSys())
 {
diff --git a/src/gpioplus/event.hpp b/src/gpioplus/event.hpp
index 06d0a3a..7e40cf0 100644
--- a/src/gpioplus/event.hpp
+++ b/src/gpioplus/event.hpp
@@ -4,6 +4,7 @@
 #include <gpioplus/handle.hpp>
 #include <gpioplus/internal/fd.hpp>
 #include <optional>
+#include <string_view>
 
 namespace gpioplus
 {
@@ -20,7 +21,7 @@
 {
   public:
     Event(const Chip& chip, uint32_t line_offset, HandleFlags handle_flags,
-          EventFlags event_flags, const char* consumer_label);
+          EventFlags event_flags, std::string_view consumer_label);
 
     const internal::Fd& getFd() const;
 
diff --git a/src/gpioplus/handle.cpp b/src/gpioplus/handle.cpp
index bcf581d..a001ed4 100644
--- a/src/gpioplus/handle.cpp
+++ b/src/gpioplus/handle.cpp
@@ -41,7 +41,7 @@
 }
 
 static int build(const Chip& chip, const std::vector<Handle::Line>& lines,
-                 HandleFlags flags, const char* consumer_label)
+                 HandleFlags flags, std::string_view consumer_label)
 {
     if (lines.size() > GPIOHANDLES_MAX)
     {
@@ -56,7 +56,11 @@
         req.default_values[i] = lines[i].default_value;
     }
     req.flags = flags.toInt();
-    strncpy(req.consumer_label, consumer_label, sizeof(req.consumer_label) - 1);
+    if (consumer_label.size() >= sizeof(req.consumer_label))
+    {
+        throw std::invalid_argument("consumer_label");
+    }
+    memcpy(req.consumer_label, consumer_label.data(), consumer_label.size());
     req.lines = lines.size();
 
     int r = chip.getFd().getSys()->gpio_get_linehandle(*chip.getFd(), &req);
@@ -70,7 +74,7 @@
 }
 
 Handle::Handle(const Chip& chip, const std::vector<Line>& lines,
-               HandleFlags flags, const char* consumer_label) :
+               HandleFlags flags, std::string_view consumer_label) :
     fd(build(chip, lines, flags, consumer_label), std::false_type(),
        chip.getFd().getSys()),
     nlines(lines.size())
diff --git a/src/gpioplus/handle.hpp b/src/gpioplus/handle.hpp
index e31483b..8bdf4d5 100644
--- a/src/gpioplus/handle.hpp
+++ b/src/gpioplus/handle.hpp
@@ -2,6 +2,7 @@
 #include <cstdint>
 #include <gpioplus/chip.hpp>
 #include <gpioplus/internal/fd.hpp>
+#include <string_view>
 #include <vector>
 
 namespace gpioplus
@@ -29,7 +30,7 @@
         uint8_t default_value;
     };
     Handle(const Chip& chip, const std::vector<Line>& lines, HandleFlags flags,
-           const char* consumer_label);
+           std::string_view consumer_label);
 
     const internal::Fd& getFd() const;
 
diff --git a/test/event.cpp b/test/event.cpp
index fa2337e..ed627e8 100644
--- a/test/event.cpp
+++ b/test/event.cpp
@@ -83,6 +83,15 @@
     EXPECT_CALL(mock, close(event_fd)).WillOnce(Return(0));
 }
 
+TEST_F(EventTest, ConstructLabelTooLong)
+{
+    const size_t large_size = sizeof(
+        reinterpret_cast<struct gpioevent_request*>(NULL)->consumer_label);
+    EXPECT_THROW(Event(*chip, 0, HandleFlags(), EventFlags(),
+                       std::string(large_size, '1')),
+                 std::invalid_argument);
+}
+
 TEST_F(EventTest, ConstructFailure)
 {
     const uint32_t line_offset = 3;
diff --git a/test/handle.cpp b/test/handle.cpp
index 08a66db..6370c30 100644
--- a/test/handle.cpp
+++ b/test/handle.cpp
@@ -111,6 +111,14 @@
                  std::runtime_error);
 }
 
+TEST_F(HandleTest, ConstructLabelTooLong)
+{
+    const size_t large_size = sizeof(
+        reinterpret_cast<struct gpiohandle_request*>(NULL)->consumer_label);
+    EXPECT_THROW(Handle(*chip, {}, HandleFlags(), std::string(large_size, '1')),
+                 std::invalid_argument);
+}
+
 TEST_F(HandleTest, ConstructError)
 {
     const std::string label{"error"};
