[libbdplus-devel] TRAP_Discovery: fix parameter validation

anonymous git at videolan.org
Thu Mar 16 11:41:18 CET 2017


libbdplus | branch: master | anonymous <anonymous at anonymous.org> | Thu Mar 16 12:40:25 2017 +0200| [3ae6025d10eacd8a4b496a222ed13f994a3eda71] | committer: anonymous

TRAP_Discovery: fix parameter validation

> http://git.videolan.org/gitweb.cgi/libbdplus.git/?a=commit;h=3ae6025d10eacd8a4b496a222ed13f994a3eda71
---

 src/libbdplus/bdsvm/trap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libbdplus/bdsvm/trap.c b/src/libbdplus/bdsvm/trap.c
index 651e987..047d165 100644
--- a/src/libbdplus/bdsvm/trap.c
+++ b/src/libbdplus/bdsvm/trap.c
@@ -1025,7 +1025,7 @@ uint32_t TRAP_Discovery(bdplus_config_t *config, uint32_t dev, uint32_t qID, uin
         return STATUS_INVALID_PARAMETER;
     if ( (dev == 1) && (qID != 1) && (qID != 2) && (qID != 3) )
         return STATUS_INVALID_PARAMETER;
-    if ( (dev == 2) & (qID != 0) & (qID != 1) )
+    if ( (dev == 2) && (qID != 0) && (qID != 1) && (qID != 2) )
         return STATUS_NOT_SUPPORTED;
 
     if (!config || !config->dev) {



More information about the libbdplus-devel mailing list