It's UWAweek 47

help3007

This forum is provided to promote discussion amongst students enrolled in CITS3007 Secure Coding. If posting a question, it's suggested you check first whether your question is answered in the unit Frequently Asked Questions (FAQ) list, and use the search box (on the right) to see if an answer to your question has already been posted.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Note that any posts must comply with the UWA Code of Conduct and the UWA Academic Conduct Policy. That means you should (a) treat everyone with respect and courtesy, and (b) not post your solutions to an assessment that's in progress.

If asking a programming question, it's recommended you read How do I ask a good question? If reporting or troubleshooting a bug in software used in the unit, it's recommend you read How to report bugs effectively.
Showing 20 of 170 articles
Showing page 3 of 9⬅ older  |  newer ⮕
Currently no other people reading this forum.


 UWA week 21 (1st semester, week 12) ↓
SVG not supported 8:11pm Wed 22nd May, ANONYMOUS

I'm looking for a quick guide on setting up Clang static analyzers for my project. Could anyone provide the steps or point me to a resource?


SVG not supported 8:09pm Wed 22nd May, ANONYMOUS

Yes, I understand these now, thanks again


SVG not supported 8:02pm Wed 22nd May, ANONYMOUS

Thank you Arran, I understand now


SVG not supported 8:01pm Wed 22nd May, ANONYMOUS

Hoping to get some clarification as to how we should be handling cases where an out of range int is passed into the caesar functions. From crypto.h, we know that a precondition of key is that it must fall within the range of (range low - range hig...


SVG not supported 3:52pm Wed 22nd May, Arran S.

Your question is already answered in the documentation for the Vigen re functions. Cheers Arran ANONYMOUS wrote


SVG not supported 3:41pm Wed 22nd May, Arran S.

You are correct - that's an error in the specification, since it fails to state what you should do in such a case and is therefore incomplete. Well spotted ) You should indeed check that the Vigen re key meets the criteria for validity, and should ...


SVG not supported 3:13pm Wed 22nd May, Arran S.

Answered off-forum. But in brief what we're writing in the project isn't really a program , but a library (admittedly a very small one) - a set of functions serving some common purpose. So as library maintainers, we can just declare caesar decry...


SVG not supported 3:08pm Wed 22nd May, Arran S.

This student contacted me off-forum, so I won't make a full reply here, but briefly - Anything from the lectures is non-normative (https developer.mozilla.org en-US docs Glossary Non-normative) - it's the project spec you should be working off - Wh...


SVG not supported 2:09pm Wed 22nd May, Arran S.

Hi, In C, the only way you can check if a string is null-terminated is if you know the size of the array that it's in. If you know the array is, say, N elements long, you can just write a loop bool is null terminated false; for(size t i 0; i...


SVG not supported 1:31pm Wed 22nd May, ANONYMOUS

I also have a follow up question regarding the Vigenere cipher, if a character does not fall within the acceptable encrypting range and we have to copy it over, do we still advance in our progression along the key or do we not change our position unt...


SVG not supported 12:53pm Wed 22nd May, ANONYMOUS

Hi, When we are validating the key input for the cli function, the spec only mentions that we must check if it is an appropriate int for Caesar encryption and decryption. It does not state about checking if Vigenere is given an appropriate string wher...


SVG not supported 12:32pm Wed 22nd May, ANONYMOUS

Hi Arran, I wanted to check whether a string from user input is null terminated before passing it to strlen or other operation which could cause undefined behaviour, but I couldn't find a way to check this. Based on my understanding, checking for nul...


SVG not supported 11:28am Wed 22nd May, ANONYMOUS

Yes, thank you


SVG not supported 10:11am Wed 22nd May, Arran S.

Hi, The cli function is the only one you're required to write a Doxygen-processable documentation block for. API documentation is essential for any public-facing function, and cli is one of those. For helper functions even though these are intern...


SVG not supported 10:04am Wed 22nd May, Arran S.

This is already answered in the project specification. Removing. ANONYMOUS wrote


SVG not supported 9:55am Wed 22nd May, ANONYMOUS

The project brief mentions 'you may also write whatever helper functions you wish.' I was wondering if we were required to write up Doxygen-processable comments for these helper functions or if it is only needed for the cli function.


SVG not supported 7:06pm Tue 21st May, ANONYMOUS

An addition to this question is how the similar pre condition for Caesar works if a key outside the range of -26 and 26 is passed, do we modulo to bring it back into range, or check this condition before calling the function and return? To me it see...


SVG not supported 7:03pm Tue 21st May, ANONYMOUS

Based on the project spec and the most recent lecture, the vigenere function can accept a key that contains both numbers and letters. What is the expected logic to process such a key, and could you please explain how this would allowed with the pre c...


SVG not supported 6:32pm Tue 21st May, ANONYMOUS

Reimplementing the logic seems unecessary and redundant, as suitable code already exists in another function. It potentially also improves the readability of the function. On the other hand, it prevents any potential separation of caesar decrypt from...


SVG not supported 6:01pm Tue 21st May, Arran S.

Hi Siya, No worries. Your mark (and the mark of anyone else who did that question) should now have been corrected, on both Moodle and csmarks. cheers Arran

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy