Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a check that index being shuffled isnt at the beginning to avoid segmentation fault. #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AlexTheAussieNerd
Copy link

If adding a tasks ABC and DEF and then setting schedules for both to be the same day (e.g. both tasks due today or tomorrow), the program segmentation faults.
This code puts a check in to see if the index being references isnt the beginning index before data is shuffled along

A bug can cause a segmentation fault. 
Add task ABC
Add task DEF
Set schedule of ABC to today.
Set schedule of DEF to today. This should cause a segmentation fault as the access after the i-- should point to an illegal address in this case.  Bug raised in issue meskio#10
@AlexTheAussieNerd
Copy link
Author

Adding more info to give specific steps to generate Segmentation fault this pull request attempts to fix.

  1. start with vanilla tudu.xml and run tudu
  2. Add a new task titled "ABC" so there are now two tasks (Welcome to "tudu" and ABC)
  3. Press "S" to schedule a date for the task ABC and leave date as today' date and press enter. (Schedule should be added correctly)
  4. change to Welcome to "tudu" task and press S and leave date as todays date and press enter. (Program should close with Segmentation fault)

Version info TuDu 0.10.3 (2019)

@AlexTheAussieNerd AlexTheAussieNerd changed the title Add a check that index being shuffled isnt beginning to avoid segmentation fault. Add a check that index being shuffled isnt at the beginning to avoid segmentation fault. Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant